diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-08-08 20:31:00 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-08-11 15:45:24 -0400 |
commit | 916702f7a962de4a598d1860e1bb63e79dcf75fa (patch) | |
tree | c47cc94266e367e5b75b425dd333ca67fa8c8ead /modules | |
parent | 127922cf44b941c26e158ef68b9117cdeed3da37 (diff) | |
download | gtk+-916702f7a962de4a598d1860e1bb63e79dcf75fa.tar.gz |
Make the xim module build without root getters
This is X specific code anyway, so no need to use
generic GDK api for this.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/input/gtkimcontextxim.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/input/gtkimcontextxim.c b/modules/input/gtkimcontextxim.c index 58bd3a822d..4a8d3ca141 100644 --- a/modules/input/gtkimcontextxim.c +++ b/modules/input/gtkimcontextxim.c @@ -660,14 +660,12 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context, KeySym keysym; Status status; gboolean result = FALSE; - GdkWindow *root_window; GdkWindow *window; XKeyPressedEvent xevent; if (event->type == GDK_KEY_RELEASE && !context_xim->filter_key_release) return FALSE; - root_window = gdk_screen_get_root_window (gdk_window_get_screen (event->window)); window = gdk_window_get_toplevel (event->window); xevent.type = (event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease; @@ -675,7 +673,7 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context, xevent.send_event = event->send_event; xevent.display = GDK_WINDOW_XDISPLAY (window); xevent.window = GDK_WINDOW_XID (window); - xevent.root = GDK_WINDOW_XID (root_window); + xevent.root = DefaultRootWindow(GDK_WINDOW_XDISPLAY (window)); xevent.subwindow = xevent.window; xevent.time = event->time; xevent.x = xevent.x_root = 0; @@ -1638,7 +1636,7 @@ on_status_toplevel_configure (GtkWidget *toplevel, if (status_window->window) { - height = gdk_window_get_height (gdk_screen_get_root_window (gtk_widget_get_screen (toplevel))); + height = DisplayHeight(GDK_WINDOW_XDISPLAY (gtk_widget_get_window (toplevel)), 0); gdk_window_get_frame_extents (gtk_widget_get_window (toplevel), &rect); |