diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2013-01-16 21:26:55 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-02-15 17:05:04 -0500 |
commit | ffbb20f730e63b6d5d1710fa06f37931271f0de0 (patch) | |
tree | e7e77d8516b3f8205bb3dfa4887027a47483646a /clients/keyboard.c | |
parent | 23ccfb3ef95efa4620498db1e5f77ae6c4c273e3 (diff) |
text: Move input_panel interface to input-method
Move the input_panel interface from desktop-shell to input-method (since
it is not really tied to desktop-shell).
Add an input_panel_surface interface like wl_shell_surface to make it
easier to extend it. Also add a parameter to the set_toplevel request to
be able to specify where to show an input panel surface on the screen.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'clients/keyboard.c')
-rw-r--r-- | clients/keyboard.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clients/keyboard.c b/clients/keyboard.c index 564afefd..986dcff7 100644 --- a/clients/keyboard.c +++ b/clients/keyboard.c @@ -31,8 +31,6 @@ #include "window.h" #include "input-method-client-protocol.h" #include "text-client-protocol.h" -#include "desktop-shell-client-protocol.h" - struct virtual_keyboard { struct input_panel *input_panel; @@ -641,6 +639,7 @@ keyboard_create(struct output *output, struct virtual_keyboard *virtual_keyboard { struct keyboard *keyboard; const struct layout *layout; + struct input_panel_surface *ips; layout = get_current_layout(virtual_keyboard); @@ -664,9 +663,11 @@ keyboard_create(struct output *output, struct virtual_keyboard *virtual_keyboard layout->columns * key_width, layout->rows * key_height); - input_panel_set_surface(virtual_keyboard->input_panel, - window_get_wl_surface(keyboard->window), - output_get_wl_output(output)); + + ips = input_panel_get_input_panel_surface(virtual_keyboard->input_panel, + window_get_wl_surface(keyboard->window)); + + input_panel_surface_set_toplevel(ips, INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM); } static void |