diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-11-09 18:40:16 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-11-09 22:52:37 -0500 |
commit | bdb442be21471a91820219347b1345ed7b84d034 (patch) | |
tree | d13bb6f7ea44ab942d4d9dfa7c3c5a1085bb8223 /gdk/x11/gdkscreen-x11.c | |
parent | 2aa52c7d0083f39615f33f663f247dc3fe2e23df (diff) | |
download | gtk+-bdb442be21471a91820219347b1345ed7b84d034.tar.gz |
x11: Reduce uses of the root window
Avoid calling the get_root_window api that returns
a GdkWindow in some places, and instead use the X
root window directly.
Diffstat (limited to 'gdk/x11/gdkscreen-x11.c')
-rw-r--r-- | gdk/x11/gdkscreen-x11.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 814ebc203c..e5c0f2c2ed 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -200,7 +200,6 @@ gdk_x11_screen_get_work_area (GdkScreen *screen, GdkRectangle *area) { GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen); - GdkWindow *root_window; Atom workarea; Atom type; Window win; @@ -215,14 +214,13 @@ gdk_x11_screen_get_work_area (GdkScreen *screen, Display *display; display = GDK_SCREEN_XDISPLAY (screen); - root_window = gdk_x11_display_get_root_window (GDK_SCREEN_DISPLAY (screen)); workarea = XInternAtom (display, "_NET_WORKAREA", True); /* Defaults in case of error */ area->x = 0; area->y = 0; - area->width = gdk_window_get_width (root_window); - area->height = gdk_window_get_height (root_window); + area->width = WidthOfScreen (x11_screen->xscreen); + area->height = HeightOfScreen (x11_screen->xscreen); if (!gdk_x11_screen_supports_net_wm_hint (screen, gdk_atom_intern_static_string ("_NET_WORKAREA"))) |