From bcced800eabbd3db42eb57c7dd0efd5d20296335 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 1 Nov 2017 20:51:14 +0100 Subject: [PATCH] x11: Remove screen-specific macros --- docs/reference/gdk/gdk4-sections.txt | 3 --- gdk/x11/gdkscreen-x11.c | 6 ++---- gdk/x11/gdkx11screen.h | 30 ---------------------------- 3 files changed, 2 insertions(+), 37 deletions(-) diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 797bb27290..81b37bd442 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -909,9 +909,6 @@ gdk_drag_context_get_type GDK_ROOT_WINDOW GDK_WINDOW_XID GDK_DISPLAY_XDISPLAY -GDK_SCREEN_XDISPLAY -GDK_SCREEN_XNUMBER -GDK_SCREEN_XSCREEN GDK_CURSOR_XCURSOR GDK_CURSOR_XDISPLAY GDK_POINTER_TO_XID diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 07fbba6390..ad6505bda7 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -180,7 +180,7 @@ get_current_desktop (GdkScreen *screen) return workspace; display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); - win = XRootWindow (display, GDK_SCREEN_XNUMBER (screen)); + win = XRootWindow (display, gdk_x11_screen_get_screen_number (screen)); current_desktop = XInternAtom (display, "_NET_CURRENT_DESKTOP", True); @@ -217,12 +217,10 @@ gdk_x11_screen_get_work_area (GdkScreen *screen, guchar *ret_workarea = NULL; long *workareas; int result; - int disp_screen; int desktop; Display *display; display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); - disp_screen = GDK_SCREEN_XNUMBER (screen); root_window = gdk_display_get_root_window (gdk_screen_get_display (screen)); workarea = XInternAtom (display, "_NET_WORKAREA", True); @@ -239,7 +237,7 @@ gdk_x11_screen_get_work_area (GdkScreen *screen, if (workarea == None) return; - win = XRootWindow (display, disp_screen); + win = XRootWindow (display, gdk_x11_screen_get_screen_number (screen)); result = XGetWindowProperty (display, win, workarea, diff --git a/gdk/x11/gdkx11screen.h b/gdk/x11/gdkx11screen.h index 6b29a7840f..d843bada7a 100644 --- a/gdk/x11/gdkx11screen.h +++ b/gdk/x11/gdkx11screen.h @@ -64,36 +64,6 @@ const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen); GDK_AVAILABLE_IN_ALL gint gdk_x11_get_default_screen (void); -/** - * GDK_SCREEN_XDISPLAY: - * @screen: a #GdkScreen - * - * Returns the display of a X11 #GdkScreen. - * - * Returns: an Xlib Display*. - */ -#define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen))) - -/** - * GDK_SCREEN_XSCREEN: - * @screen: a #GdkScreen - * - * Returns the screen of a X11 #GdkScreen. - * - * Returns: an Xlib Screen* - */ -#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen)) - -/** - * GDK_SCREEN_XNUMBER: - * @screen: a #GdkScreen - * - * Returns the index of a X11 #GdkScreen. - * - * Returns: the position of @screen among the screens of its display - */ -#define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen)) - GDK_AVAILABLE_IN_ALL gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom property);