Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mvaldina/weston
  • ant8me/weston
  • JaredHu/weston
  • drawat/weston
  • bnieuwenhuizen/weston
  • Robyn.marie/weston
  • dwrobel/weston
  • yjheo/weston
  • dos/weston
  • longjunyu2/weston
  • soerenmeier/weston
  • igor.torrente/weston
  • luckyziv/weston
  • qyliss/weston
  • tantan/weston
  • wengxt/weston
  • mroussin/weston
  • n3rdopolis/weston
  • xiangxuy/weston
  • RAOF/weston
  • afrantzis/weston
  • lujin/weston
  • jayjona42/weston
  • ascent/weston
  • inzamam.15/weston
  • bbara93/weston
  • adoan/weston
  • Vivalavina/weston
  • iason.paraskevopoulos/weston
  • phnaharris/weston
  • mforney/weston
  • linkmauve/weston
  • xexaxo/weston
  • rajendraprasadkj/weston
  • xeechou/weston
  • learning/weston
  • agners/weston
  • ianr/weston
  • eucan/weston
  • heemin.lee/weston
  • nniro/weston
  • PaulKocialkowski/weston
  • msisov/weston
  • ollieparanoid/weston
  • pH5/weston
  • dbaker/weston
  • gtristan/weston
  • khosokawa/weston
  • lubosz/weston
  • Fahien/weston
  • m.tretter/weston
  • valpackett/weston
  • marimeireles/weston
  • afd/weston
  • lk1025/weston
  • marler8997/weston
  • jianglei121381/weston
  • flakylawww/weston
  • ayaka/weston
  • bbeckett/weston
  • rdp.effort/weston
  • Ganjing0224/weston
  • jcline/weston
  • bl4ckb0ne/weston
  • Bastian-Krause/weston
  • fifi899173/weston
  • jpewhacker/weston
  • yuanye100/weston
  • t-8ch/weston
  • HarshaMM/weston
  • david.turner/weston
  • wismill/weston
  • rsmith/weston
  • rohanjulka19/weston
  • shadeslayer/weston
  • sjoerd/weston
  • barry.song/weston
  • petervdperk/weston
  • renjiayuan1314/weston
  • HeYong/weston
  • bluesirhl/weston
  • macpijan/weston
  • andreinonea/weston
  • vanfanel/weston
  • mstoeckl/weston
  • chewi/weston
  • shierote/weston
  • tmaillart1/weston
  • jh-hsd/weston
  • bgjdarm/weston
  • anurup_m/weston
  • lucaweiss/weston
  • dima/weston
  • marysaka/weston
  • daissi/weston
  • vnguyentrong/weston
  • enocknyaega/weston
  • kang-sooyeon/weston
  • tpetazzoni/weston
  • mihlenfeldt/weston
  • rgallaispou/weston
  • chienpv/weston
  • kraj/weston
  • stolk/weston
  • Emantor/weston
  • kusma/weston
  • bmkimg/weston
  • 9531718244loco/weston
  • Ts/weston
  • kennylevinsen/weston
  • eyelash/weston
  • Igortorrente/weston
  • pleasurefish/weston
  • ahe/weston
  • ekurzinger/weston
  • pochu/weston
  • saavedra.pablo/weston
  • borneoa/weston
  • JimmyOhn/weston
  • ShivakumarVH/weston
  • Cwiiis/weston
  • romangg/weston
  • zubzub/weston
  • askebm/weston
  • ewtoombs/weston
  • wolf._.lael666/weston
  • dr3020187/weston
  • kxing/weston_hpd
  • filip-hejsek/weston
  • xndcn/weston
  • therealkenc/weston
  • C0rn3j/weston
  • tmaillart/weston
  • leandrohrb/weston
  • snow/weston
  • marex/weston
  • bnlrnz/weston
  • zhourunsheng2008/weston
  • zhouliang/weston
  • isinyaaa/weston
  • JeffyCN/weston
  • tzimmermann/weston
  • christian-rauch/weston
  • krh/weston
  • Rigo-V/weston
  • archiesix/weston
  • cwjo/weston
  • hedone21/weston
  • liyi42/weston
  • uniontechWu/weston
  • justdoGIT/weston
  • ajax/weston
  • pmenzel/weston
  • mominurisiamm887/weston
  • denix0/weston
  • ivyl/weston
  • fallahmahid.mahdi/weston
  • Alvarito050506/weston
  • obbardc/weston
  • joantolo/weston
  • zumbi/weston
  • doubleagent3276/weston
  • leoli/weston
  • dude/weston
  • cardenasvitealejandro/weston
  • ljia5/weston
  • Trigger.Huang/weston
  • swick/weston
  • Wladmis/weston
  • vyivel/weston
  • orbitcowboy/weston
  • AIDEA775/weston
  • maos20008/weston
  • mvicomoya/weston
  • bbrezillon/weston
  • wujiansun/weston
  • Benjamin_Loison/weston
  • rhelmot/weston
  • rgonzalez/weston
  • ekapllaj/weston
  • Shugyousha/weston
  • carbn/weston
  • derekf/weston
  • gyeyoung976/weston
  • dhobsong/weston
  • jeri.li/weston
  • mtey/weston
  • etom/weston
  • azeps/weston
  • champagneg/weston
  • makepost/weston
  • trem/weston
  • hwentland/weston
  • Ambyjkl/weston
  • YDinhVan/weston
  • pixellon/weston
  • daniels/weston
  • OctopusET/weston
  • emersion/weston
  • gilvbp/weston
  • yadneshk/weston
  • mvlad/weston
  • phreer/weston
  • diegonieto/weston
  • vliaskov/weston
  • Vivek/weston
  • sami/weston
  • creiter/weston
  • NaveenKumar/weston
  • luigi.santivetti/weston
  • aknautiyal/weston
  • martinetd/weston
  • 5HT/weston
  • yayowd/qimm
  • khangtb/weston
  • Laplac2/weston
  • pritbisw/weston
  • molinari/weston
  • vvavrychuk/weston
  • zzyiwei/weston
  • vanvugt/weston
  • pq/weston
  • qaqsw24/weston
  • gfxstrand/weston
  • alex.kanavin/weston
  • pinchyguey45/weston
  • davidre/weston
  • bigbear1385/weston
  • zzag/weston
  • benh/weston
  • harpreetbasra1313/weston
  • rmader/weston
  • phomes/weston
  • Heartyharts/weston
  • arandomhuman/weston
  • kchibisov/weston
  • hwti/weston
  • abhinavk/weston
  • vitalyp/weston
  • pedestrianlove/weston
  • sardemff7/weston
  • Ivaniku/tayland
  • JoseExposito/weston
  • zeerd/weston
  • jadahl/weston
  • sophia/weston
  • mol/weston
  • rawoul/weston
  • maxice8/weston
  • whot/weston
  • Qingwu-Li/weston
  • lfrb/weston
  • heftig/weston
  • Calandracas/weston
  • SergioGDR/weston
  • Foreal/weston
  • ghishadow/weston
  • puhui/weston
  • dmitry.batrak1/weston
  • fanbaby6/weston
  • chiragkhurana/weston
  • amaksoft/weston
  • surban/weston
  • smit-mayani/weston
  • jwillikers/weston
  • meshki022/weston
  • pritamabiswas/weston
  • antonino/weston
  • k77951586/weston
  • ChaoGuo/weston
  • ColinKinloch/weston
  • paraaz4959/weston
  • ivan.nikolaenko/weston
  • adarshgm/weston
  • ericruei/weston
  • harishkrupo/weston
  • VKadasani/weston
  • jameshilliard/weston
  • davidedmundson/weston
  • strassek/weston
  • flto/weston
  • Kishore409/weston
  • ktullavik/weston
  • Eugeniy.Paltsev/weston
  • sameer.lattannavar/weston
  • jesstindean85/weston
  • ashie/weston
  • Zamundaaa/weston
  • jlindgren90/weston
  • wayland/weston
  • LARathbone/weston
  • g0hl1n/weston
  • matth/weston
  • nicolesager7/weston
  • hitong602/weston
  • Rpegusus2233/weston
  • bentiss/weston
  • hthiery/weston
  • thewayoftherob/weston
  • ofourdan/weston
  • enunes/weston
  • tomek/weston
  • bugaevc/weston
  • eero-t/weston
304 results
Show changes
Commits on Source (2)
......@@ -60,6 +60,7 @@ struct virtual_keyboard {
uint32_t surrounding_cursor;
struct keyboard *keyboard;
bool toplevel;
bool overlay;
struct zwp_input_panel_surface_v1 *ips;
};
......@@ -970,15 +971,38 @@ set_toplevel(struct output *output, struct virtual_keyboard *virtual_keyboard)
ZWP_INPUT_PANEL_SURFACE_V1_POSITION_CENTER_BOTTOM);
virtual_keyboard->toplevel = true;
virtual_keyboard->overlay = false;
virtual_keyboard->ips = ips;
}
static void
set_overlay(struct output *output, struct virtual_keyboard *virtual_keyboard)
{
struct zwp_input_panel_surface_v1 *ips;
struct keyboard *keyboard = virtual_keyboard->keyboard;
ips = zwp_input_panel_v1_get_input_panel_surface(virtual_keyboard->input_panel,
window_get_wl_surface(keyboard->window));
zwp_input_panel_surface_v1_set_overlay_panel(ips);
virtual_keyboard->toplevel = false;
virtual_keyboard->overlay = true;
virtual_keyboard->ips = ips;
}
static void
display_output_handler(struct output *output, void *data) {
struct virtual_keyboard *keyboard = data;
const char *type = getenv("WESTON_KEYBOARD_SURFACE_TYPE");
if (!keyboard->toplevel)
set_toplevel(output, keyboard);
if (type && strcasecmp("overlay", type) == 0) {
if (!keyboard->overlay)
set_overlay(output, keyboard);
} else {
if (!keyboard->toplevel)
set_toplevel(output, keyboard);
}
}
static void
......
......@@ -103,6 +103,7 @@ struct text_backend {
struct {
char *path;
bool overlay_keyboard;
struct wl_client *client;
unsigned deathcount;
......@@ -993,6 +994,9 @@ launch_input_method(struct text_backend *text_backend)
if (strcmp(text_backend->input_method.path, "") == 0)
return;
if (text_backend->input_method.overlay_keyboard)
setenv("WESTON_KEYBOARD_SURFACE_TYPE", "overlay", 1);
text_backend->input_method.client =
weston_client_start(text_backend->compositor,
text_backend->input_method.path);
......@@ -1060,6 +1064,9 @@ text_backend_configuration(struct text_backend *text_backend)
weston_config_section_get_string(section, "path",
&text_backend->input_method.path,
client);
weston_config_section_get_bool(section, "overlay-keyboard",
&text_backend->input_method.overlay_keyboard,
false);
free(client);
}
......
......@@ -59,6 +59,23 @@ input_panel_slide_done(struct weston_view_animation *animation, void *data)
ipsurf->anim = NULL;
}
static int
calc_input_panel_position(struct input_panel_surface *ip_surface, float *x, float*y)
{
struct desktop_shell *shell = ip_surface->shell;
if (ip_surface->panel) {
struct weston_view *view = get_default_view(shell->text_input.surface);
if (view == NULL)
return -1;
*x = view->geometry.x + shell->text_input.cursor_rectangle.x2;
*y = view->geometry.y + shell->text_input.cursor_rectangle.y2;
} else {
*x = ip_surface->output->x + (ip_surface->output->width - ip_surface->surface->width) / 2;
*y = ip_surface->output->y + ip_surface->output->height - ip_surface->surface->height;
}
return 0;
}
static void
show_input_panel_surface(struct input_panel_surface *ipsurf)
{
......@@ -77,8 +94,8 @@ show_input_panel_surface(struct input_panel_surface *ipsurf)
if (!focus)
continue;
ipsurf->output = focus->output;
x = ipsurf->output->x + (ipsurf->output->width - ipsurf->surface->width) / 2;
y = ipsurf->output->y + ipsurf->output->height - ipsurf->surface->height;
if (calc_input_panel_position(ipsurf, &x, &y))
continue;
weston_view_set_position(ipsurf->view, x, y);
}
......@@ -170,23 +187,13 @@ input_panel_committed(struct weston_surface *surface, int32_t sx, int32_t sy)
{
struct input_panel_surface *ip_surface = surface->committed_private;
struct desktop_shell *shell = ip_surface->shell;
struct weston_view *view;
float x, y;
if (surface->width == 0)
return;
if (ip_surface->panel) {
view = get_default_view(shell->text_input.surface);
if (view == NULL)
return;
x = view->geometry.x + shell->text_input.cursor_rectangle.x2;
y = view->geometry.y + shell->text_input.cursor_rectangle.y2;
} else {
x = ip_surface->output->x + (ip_surface->output->width - surface->width) / 2;
y = ip_surface->output->y + ip_surface->output->height - surface->height;
}
if (calc_input_panel_position(ip_surface, &x, &y))
return;
weston_view_set_position(ip_surface->view, x, y);
if (!weston_surface_is_mapped(surface) && shell->showing_input_panels)
......
......@@ -574,6 +574,11 @@ request. Currently, this option is supported by kiosk-shell.
sets the path of the on screen keyboard input method (string).
.RE
.RE
.TP 7
.BI "overlay-keyboard=" false
sets weston-keyboard as overlay panel.
.RE
.RE
.SH "KEYBOARD SECTION"
This section contains the following keys:
.TP 7
......