diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-07-29 22:55:19 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-07-29 22:58:37 -0400 |
commit | 7df070d681a3a1bec023e501da2c3466cfa71b32 (patch) | |
tree | 9e15937fdba3ded94c7bc5c00facfedb109b13e0 /gdk | |
parent | 9722bb4d9e6508ebbaf4d237e5580a7209db31f4 (diff) | |
download | gtk+-7df070d681a3a1bec023e501da2c3466cfa71b32.tar.gz |
gdk: Move default group api to the X11 backend
This is the only place where it is implemented.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/broadway/gdkdisplay-broadway.c | 9 | ||||
-rw-r--r-- | gdk/gdkdisplay.c | 19 | ||||
-rw-r--r-- | gdk/gdkdisplay.h | 3 | ||||
-rw-r--r-- | gdk/gdkdisplayprivate.h | 1 | ||||
-rw-r--r-- | gdk/wayland/gdkdisplay-wayland.c | 9 | ||||
-rw-r--r-- | gdk/win32/gdkdisplay-win32.c | 11 | ||||
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 14 | ||||
-rw-r--r-- | gdk/x11/gdksurface-x11.c | 2 | ||||
-rw-r--r-- | gdk/x11/gdkx11display.h | 3 |
9 files changed, 16 insertions, 55 deletions
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index af1fd47ce4..5b406e3e15 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -265,14 +265,6 @@ gdk_broadway_display_has_pending (GdkDisplay *display) return FALSE; } -static GdkSurface * -gdk_broadway_display_get_default_group (GdkDisplay *display) -{ - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - - return NULL; -} - static void gdk_broadway_display_dispose (GObject *object) { @@ -441,7 +433,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class) display_class->flush = gdk_broadway_display_flush; display_class->has_pending = gdk_broadway_display_has_pending; display_class->queue_events = _gdk_broadway_display_queue_events; - display_class->get_default_group = gdk_broadway_display_get_default_group; display_class->get_next_serial = gdk_broadway_display_get_next_serial; display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete; diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 12a7edc159..5e147b4571 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -995,25 +995,6 @@ gdk_display_flush (GdkDisplay *display) } /** - * gdk_display_get_default_group: - * @display: a #GdkDisplay - * - * Returns the default group leader surface for all toplevel surfaces - * on @display. This surface is implicitly created by GDK. - * See gdk_surface_set_group(). - * - * Returns: (transfer none): The default group leader surface - * for @display - **/ -GdkSurface * -gdk_display_get_default_group (GdkDisplay *display) -{ - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - - return GDK_DISPLAY_GET_CLASS (display)->get_default_group (display); -} - -/** * gdk_display_get_clipboard: * @display: a #GdkDisplay * diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h index de39f54271..97d8e7eee6 100644 --- a/gdk/gdkdisplay.h +++ b/gdk/gdkdisplay.h @@ -72,9 +72,6 @@ GDK_AVAILABLE_IN_ALL GdkDisplay *gdk_display_get_default (void); GDK_AVAILABLE_IN_ALL -GdkSurface *gdk_display_get_default_group (GdkDisplay *display); - -GDK_AVAILABLE_IN_ALL GdkClipboard * gdk_display_get_clipboard (GdkDisplay *display); GDK_AVAILABLE_IN_ALL GdkClipboard * gdk_display_get_primary_clipboard (GdkDisplay *display); diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 7bdc5fc6ba..3b5af7e01d 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -123,7 +123,6 @@ struct _GdkDisplayClass gboolean (*has_pending) (GdkDisplay *display); void (*queue_events) (GdkDisplay *display); void (*make_default) (GdkDisplay *display); - GdkSurface * (*get_default_group) (GdkDisplay *display); GdkAppLaunchContext * (*get_app_launch_context) (GdkDisplay *display); diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 03a00a14fb..f6cac82264 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -846,14 +846,6 @@ gdk_wayland_display_has_pending (GdkDisplay *display) return FALSE; } -static GdkSurface * -gdk_wayland_display_get_default_group (GdkDisplay *display) -{ - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - - return NULL; -} - static gulong gdk_wayland_display_get_next_serial (GdkDisplay *display) { @@ -1012,7 +1004,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class) display_class->make_default = gdk_wayland_display_make_default; display_class->has_pending = gdk_wayland_display_has_pending; display_class->queue_events = _gdk_wayland_display_queue_events; - display_class->get_default_group = gdk_wayland_display_get_default_group; display_class->get_app_launch_context = _gdk_wayland_display_get_app_launch_context; display_class->get_next_serial = gdk_wayland_display_get_next_serial; display_class->get_startup_notification_id = gdk_wayland_display_get_startup_notification_id; diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 9b196bf3da..5b76c95ac6 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -612,16 +612,6 @@ gdk_win32_display_get_name (GdkDisplay *display) return display_name_cache; } -static GdkSurface * -gdk_win32_display_get_default_group (GdkDisplay *display) -{ - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - - g_warning ("gdk_display_get_default_group not yet implemented"); - - return NULL; -} - static void gdk_win32_display_beep (GdkDisplay *display) { @@ -1061,7 +1051,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass) display_class->flush = gdk_win32_display_flush; display_class->has_pending = _gdk_win32_display_has_pending; display_class->queue_events = _gdk_win32_display_queue_events; - display_class->get_default_group = gdk_win32_display_get_default_group; //? display_class->get_app_launch_context = _gdk_win32_display_get_app_launch_context; diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 1c30c89e40..92a3e7dbf1 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1829,7 +1829,18 @@ gdk_x11_display_has_pending (GdkDisplay *display) return XPending (GDK_DISPLAY_XDISPLAY (display)); } -static GdkSurface * +/** + * gdk_x11_display_get_default_group: + * @display: a #GdkDisplay + * + * Returns the default group leader surface for all toplevel surfaces + * on @display. This surface is implicitly created by GDK. + * See gdk_surface_set_group(). + * + * Returns: (transfer none): The default group leader surface + * for @display + */ +GdkSurface * gdk_x11_display_get_default_group (GdkDisplay *display) { g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); @@ -2937,7 +2948,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class) display_class->make_default = gdk_x11_display_make_default; display_class->has_pending = gdk_x11_display_has_pending; display_class->queue_events = _gdk_x11_display_queue_events; - display_class->get_default_group = gdk_x11_display_get_default_group; display_class->get_app_launch_context = _gdk_x11_display_get_app_launch_context; display_class->get_next_serial = gdk_x11_display_get_next_serial; diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 385a5c0ccd..29b9388d5a 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -3392,7 +3392,7 @@ gdk_x11_surface_set_group (GdkSurface *surface, toplevel = _gdk_x11_surface_get_toplevel (surface); if (leader == NULL) - leader = gdk_display_get_default_group (gdk_surface_get_display (surface)); + leader = gdk_x11_display_get_default_group (gdk_surface_get_display (surface)); if (toplevel->group_leader != leader) { diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h index a84247fd00..299864d217 100644 --- a/gdk/x11/gdkx11display.h +++ b/gdk/x11/gdkx11display.h @@ -128,6 +128,9 @@ void gdk_x11_display_error_trap_pop_ignored (GdkDispla GDK_AVAILABLE_IN_ALL void gdk_x11_set_sm_client_id (const char *sm_client_id); +GDK_AVAILABLE_IN_ALL +GdkSurface * gdk_x11_display_get_default_group (GdkDisplay *display); + G_END_DECLS #endif /* __GDK_X11_DISPLAY_H__ */ |