[gtk+/wip/otte/gtk4: 22/118] API: screen: Remove gdk_screen_get_active_window()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 22/118] API: screen: Remove gdk_screen_get_active_window()
- Date: Fri, 7 Oct 2016 00:01:32 +0000 (UTC)
commit c844bf42bbb89c7fb7559c60bc681b2611c8d763
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 28 02:16:53 2016 +0200
API: screen: Remove gdk_screen_get_active_window()
... and gdk_screen_get_window_stack().
Those functions were originally added in
5afb4f0f116f0e8a200dd55cc6688a957b4d397c but do not seem to be used as
they are not implemented anywhere but in X.
As GDK is not meant to fulfill window management functionality I'm going
to remove these functions without replacements.
docs/reference/gdk/gdk3-sections.txt | 2 -
gdk/broadway/gdkscreen-broadway.c | 14 -----
gdk/gdkscreen.c | 65 ------------------------
gdk/gdkscreen.h | 5 --
gdk/gdkscreenprivate.h | 2 -
gdk/mir/gdkmirscreen.c | 16 ------
gdk/quartz/gdkscreen-quartz.c | 14 -----
gdk/wayland/gdkscreen-wayland.c | 14 -----
gdk/win32/gdkscreen-win32.c | 18 -------
gdk/x11/gdkscreen-x11.c | 90 ----------------------------------
10 files changed, 0 insertions(+), 240 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index ea8808b..38ccefc 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -223,8 +223,6 @@ gdk_screen_get_font_options
gdk_screen_set_font_options
gdk_screen_get_resolution
gdk_screen_set_resolution
-gdk_screen_get_active_window
-gdk_screen_get_window_stack
<SUBSECTION Standard>
GDK_SCREEN
diff --git a/gdk/broadway/gdkscreen-broadway.c b/gdk/broadway/gdkscreen-broadway.c
index 273e26d..787c48d 100644
--- a/gdk/broadway/gdkscreen-broadway.c
+++ b/gdk/broadway/gdkscreen-broadway.c
@@ -160,18 +160,6 @@ gdk_broadway_screen_make_display_name (GdkScreen *screen)
return g_strdup ("browser");
}
-static GdkWindow *
-gdk_broadway_screen_get_active_window (GdkScreen *screen)
-{
- return NULL;
-}
-
-static GList *
-gdk_broadway_screen_get_window_stack (GdkScreen *screen)
-{
- return NULL;
-}
-
static void
gdk_broadway_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
@@ -204,8 +192,6 @@ gdk_broadway_screen_class_init (GdkBroadwayScreenClass *klass)
screen_class->get_root_window = gdk_broadway_screen_get_root_window;
screen_class->is_composited = gdk_broadway_screen_is_composited;
screen_class->make_display_name = gdk_broadway_screen_make_display_name;
- screen_class->get_active_window = gdk_broadway_screen_get_active_window;
- screen_class->get_window_stack = gdk_broadway_screen_get_window_stack;
screen_class->broadcast_client_message = gdk_broadway_screen_broadcast_client_message;
screen_class->get_setting = gdk_broadway_screen_get_setting;
screen_class->get_rgba_visual = gdk_broadway_screen_get_rgba_visual;
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index bbf947b..36ca9c8 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -503,71 +503,6 @@ gdk_screen_make_display_name (GdkScreen *screen)
}
/**
- * gdk_screen_get_active_window:
- * @screen: a #GdkScreen
- *
- * Returns the screen’s currently active window.
- *
- * On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
- * on the root window, as described in the
- * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
- * If there is no currently currently active
- * window, or the window manager does not support the
- * _NET_ACTIVE_WINDOW hint, this function returns %NULL.
- *
- * On other platforms, this function may return %NULL, depending on whether
- * it is implementable on that platform.
- *
- * The returned window should be unrefed using g_object_unref() when
- * no longer needed.
- *
- * Returns: (nullable) (transfer full): the currently active window,
- * or %NULL.
- *
- * Since: 2.10
- **/
-GdkWindow *
-gdk_screen_get_active_window (GdkScreen *screen)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return GDK_SCREEN_GET_CLASS (screen)->get_active_window (screen);
-}
-
-/**
- * gdk_screen_get_window_stack:
- * @screen: a #GdkScreen
- *
- * Returns a #GList of #GdkWindows representing the current
- * window stack.
- *
- * On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
- * property on the root window, as described in the
- * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
- * If the window manager does not support the
- * _NET_CLIENT_LIST_STACKING hint, this function returns %NULL.
- *
- * On other platforms, this function may return %NULL, depending on whether
- * it is implementable on that platform.
- *
- * The returned list is newly allocated and owns references to the
- * windows it contains, so it should be freed using g_list_free() and
- * its windows unrefed using g_object_unref() when no longer needed.
- *
- * Returns: (nullable) (transfer full) (element-type GdkWindow): a
- * list of #GdkWindows for the current window stack, or %NULL.
- *
- * Since: 2.10
- **/
-GList *
-gdk_screen_get_window_stack (GdkScreen *screen)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return GDK_SCREEN_GET_CLASS (screen)->get_window_stack (screen);
-}
-
-/**
* gdk_screen_get_setting:
* @screen: the #GdkScreen where the setting is located
* @name: the name of the setting
diff --git a/gdk/gdkscreen.h b/gdk/gdkscreen.h
index 6d2da06..e981d38 100644
--- a/gdk/gdkscreen.h
+++ b/gdk/gdkscreen.h
@@ -80,11 +80,6 @@ void gdk_screen_set_resolution (GdkScreen *screen,
GDK_AVAILABLE_IN_ALL
gdouble gdk_screen_get_resolution (GdkScreen *screen);
-GDK_AVAILABLE_IN_ALL
-GdkWindow *gdk_screen_get_active_window (GdkScreen *screen);
-GDK_AVAILABLE_IN_ALL
-GList *gdk_screen_get_window_stack (GdkScreen *screen);
-
G_END_DECLS
#endif /* __GDK_SCREEN_H__ */
diff --git a/gdk/gdkscreenprivate.h b/gdk/gdkscreenprivate.h
index e4001c6..3361a8a 100644
--- a/gdk/gdkscreenprivate.h
+++ b/gdk/gdkscreenprivate.h
@@ -64,8 +64,6 @@ struct _GdkScreenClass
GdkVisual * (* get_rgba_visual) (GdkScreen *screen);
gboolean (* is_composited) (GdkScreen *screen);
gchar * (* make_display_name) (GdkScreen *screen);
- GdkWindow * (* get_active_window) (GdkScreen *screen);
- GList * (* get_window_stack) (GdkScreen *screen);
void (* broadcast_client_message) (GdkScreen *screen,
GdkEvent *event);
gboolean (* get_setting) (GdkScreen *screen,
diff --git a/gdk/mir/gdkmirscreen.c b/gdk/mir/gdkmirscreen.c
index 0061ea1..694e847 100644
--- a/gdk/mir/gdkmirscreen.c
+++ b/gdk/mir/gdkmirscreen.c
@@ -426,20 +426,6 @@ gdk_mir_screen_make_display_name (GdkScreen *screen)
return NULL; // FIXME
}
-static GdkWindow *
-gdk_mir_screen_get_active_window (GdkScreen *screen)
-{
- //g_printerr ("gdk_mir_screen_get_active_window\n");
- return NULL; // FIXME
-}
-
-static GList *
-gdk_mir_screen_get_window_stack (GdkScreen *screen)
-{
- //g_printerr ("gdk_mir_screen_get_window_stack\n");
- return NULL; // FIXME
-}
-
static void
gdk_mir_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
@@ -819,8 +805,6 @@ gdk_mir_screen_class_init (GdkMirScreenClass *klass)
screen_class->get_rgba_visual = gdk_mir_screen_get_rgba_visual;
screen_class->is_composited = gdk_mir_screen_is_composited;
screen_class->make_display_name = gdk_mir_screen_make_display_name;
- screen_class->get_active_window = gdk_mir_screen_get_active_window;
- screen_class->get_window_stack = gdk_mir_screen_get_window_stack;
screen_class->broadcast_client_message = gdk_mir_screen_broadcast_client_message;
screen_class->get_setting = gdk_mir_screen_get_setting;
screen_class->visual_get_best_depth = gdk_mir_screen_visual_get_best_depth;
diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c
index 58ce7a9..9ec6352 100644
--- a/gdk/quartz/gdkscreen-quartz.c
+++ b/gdk/quartz/gdkscreen-quartz.c
@@ -458,18 +458,6 @@ gdk_quartz_screen_make_display_name (GdkScreen *screen)
return g_strdup (gdk_display_get_name (_gdk_display));
}
-static GdkWindow *
-gdk_quartz_screen_get_active_window (GdkScreen *screen)
-{
- return NULL;
-}
-
-static GList *
-gdk_quartz_screen_get_window_stack (GdkScreen *screen)
-{
- return NULL;
-}
-
static gboolean
gdk_quartz_screen_is_composited (GdkScreen *screen)
{
@@ -500,8 +488,6 @@ gdk_quartz_screen_class_init (GdkQuartzScreenClass *klass)
screen_class->get_monitor_workarea = gdk_quartz_screen_get_monitor_workarea;
screen_class->is_composited = gdk_quartz_screen_is_composited;
screen_class->make_display_name = gdk_quartz_screen_make_display_name;
- screen_class->get_active_window = gdk_quartz_screen_get_active_window;
- screen_class->get_window_stack = gdk_quartz_screen_get_window_stack;
screen_class->broadcast_client_message = _gdk_quartz_screen_broadcast_client_message;
screen_class->get_setting = _gdk_quartz_screen_get_setting;
screen_class->get_rgba_visual = _gdk_quartz_screen_get_rgba_visual;
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index bb35bff..ca58d3e 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -141,18 +141,6 @@ gdk_wayland_screen_make_display_name (GdkScreen *screen)
return g_strdup (gdk_display_get_name (GDK_WAYLAND_SCREEN (screen)->display));
}
-static GdkWindow *
-gdk_wayland_screen_get_active_window (GdkScreen *screen)
-{
- return NULL;
-}
-
-static GList *
-gdk_wayland_screen_get_window_stack (GdkScreen *screen)
-{
- return NULL;
-}
-
static void
gdk_wayland_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
@@ -819,8 +807,6 @@ _gdk_wayland_screen_class_init (GdkWaylandScreenClass *klass)
screen_class->get_rgba_visual = gdk_wayland_screen_get_rgba_visual;
screen_class->is_composited = gdk_wayland_screen_is_composited;
screen_class->make_display_name = gdk_wayland_screen_make_display_name;
- screen_class->get_active_window = gdk_wayland_screen_get_active_window;
- screen_class->get_window_stack = gdk_wayland_screen_get_window_stack;
screen_class->broadcast_client_message = gdk_wayland_screen_broadcast_client_message;
screen_class->get_setting = gdk_wayland_screen_get_setting;
screen_class->visual_get_best_depth = gdk_wayland_screen_visual_get_best_depth;
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index 138f0a2..c67c8ae 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -392,22 +392,6 @@ gdk_win32_screen_make_display_name (GdkScreen *screen)
return g_strdup (gdk_display_get_name (_gdk_display));
}
-static GdkWindow *
-gdk_win32_screen_get_active_window (GdkScreen *screen)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return NULL;
-}
-
-static GList *
-gdk_win32_screen_get_window_stack (GdkScreen *screen)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return NULL;
-}
-
static gboolean
gdk_win32_screen_is_composited (GdkScreen *screen)
{
@@ -544,8 +528,6 @@ gdk_win32_screen_class_init (GdkWin32ScreenClass *klass)
screen_class->get_root_window = gdk_win32_screen_get_root_window;
screen_class->is_composited = gdk_win32_screen_is_composited;
screen_class->make_display_name = gdk_win32_screen_make_display_name;
- screen_class->get_active_window = gdk_win32_screen_get_active_window;
- screen_class->get_window_stack = gdk_win32_screen_get_window_stack;
screen_class->get_setting = _gdk_win32_screen_get_setting;
screen_class->get_system_visual = gdk_win32_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_win32_screen_get_rgba_visual;
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 78dd584..abe73df 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -1112,94 +1112,6 @@ gdk_x11_screen_make_display_name (GdkScreen *screen)
gdk_x11_screen_get_screen_number (screen));
}
-static GdkWindow *
-gdk_x11_screen_get_active_window (GdkScreen *screen)
-{
- GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- GdkWindow *ret = NULL;
- Atom type_return;
- gint format_return;
- gulong nitems_return;
- gulong bytes_after_return;
- guchar *data = NULL;
-
- if (!gdk_x11_screen_supports_net_wm_hint (screen,
- gdk_atom_intern_static_string ("_NET_ACTIVE_WINDOW")))
- return NULL;
-
- if (XGetWindowProperty (x11_screen->xdisplay, x11_screen->xroot_window,
- gdk_x11_get_xatom_by_name_for_display (x11_screen->display,
- "_NET_ACTIVE_WINDOW"),
- 0, 1, False, XA_WINDOW, &type_return,
- &format_return, &nitems_return,
- &bytes_after_return, &data)
- == Success)
- {
- if ((type_return == XA_WINDOW) && (format_return == 32) && (data))
- {
- Window window = *(Window *) data;
-
- if (window != None)
- {
- ret = gdk_x11_window_foreign_new_for_display (x11_screen->display,
- window);
- }
- }
- }
-
- if (data)
- XFree (data);
-
- return ret;
-}
-
-static GList *
-gdk_x11_screen_get_window_stack (GdkScreen *screen)
-{
- GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- GList *ret = NULL;
- Atom type_return;
- gint format_return;
- gulong nitems_return;
- gulong bytes_after_return;
- guchar *data = NULL;
-
- if (!gdk_x11_screen_supports_net_wm_hint (screen,
- gdk_atom_intern_static_string ("_NET_CLIENT_LIST_STACKING")))
- return NULL;
-
- if (XGetWindowProperty (x11_screen->xdisplay, x11_screen->xroot_window,
- gdk_x11_get_xatom_by_name_for_display (x11_screen->display,
- "_NET_CLIENT_LIST_STACKING"),
- 0, G_MAXLONG, False, XA_WINDOW, &type_return,
- &format_return, &nitems_return,
- &bytes_after_return, &data)
- == Success)
- {
- if ((type_return == XA_WINDOW) && (format_return == 32) &&
- (data) && (nitems_return > 0))
- {
- gulong *stack = (gulong *) data;
- GdkWindow *win;
- int i;
-
- for (i = 0; i < nitems_return; i++)
- {
- win = gdk_x11_window_foreign_new_for_display (x11_screen->display,
- (Window)stack[i]);
-
- if (win != NULL)
- ret = g_list_append (ret, win);
- }
- }
- }
-
- if (data)
- XFree (data);
-
- return ret;
-}
-
static gboolean
gdk_x11_screen_get_setting (GdkScreen *screen,
const gchar *name,
@@ -1505,8 +1417,6 @@ gdk_x11_screen_class_init (GdkX11ScreenClass *klass)
screen_class->get_rgba_visual = gdk_x11_screen_get_rgba_visual;
screen_class->is_composited = gdk_x11_screen_is_composited;
screen_class->make_display_name = gdk_x11_screen_make_display_name;
- screen_class->get_active_window = gdk_x11_screen_get_active_window;
- screen_class->get_window_stack = gdk_x11_screen_get_window_stack;
screen_class->get_setting = gdk_x11_screen_get_setting;
screen_class->visual_get_best_depth = _gdk_x11_screen_visual_get_best_depth;
screen_class->visual_get_best_type = _gdk_x11_screen_visual_get_best_type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]