diff options
author | Benjamin Otte <otte@redhat.com> | 2016-09-29 22:23:51 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-10-16 18:17:21 +0200 |
commit | 2fd5048943fdb3e9ceccb77fdd4839ad217c5b08 (patch) | |
tree | d851bf8bd09f262997c2a8573c18f5c867c9f65a /gdk | |
parent | fe24fcbc3e71bcf7e222a4106bf6e3f7ec114e28 (diff) | |
download | gtk+-2fd5048943fdb3e9ceccb77fdd4839ad217c5b08.tar.gz |
API: window: Remove suppport for changing wmclass_name/group
X11 was the only backend to support it and people can just override it
using XSetClassHint() directly.
The docs already advertised the function as "Do not use".
Keep the existing call to XSetClassHint() in place, so that we keep
setting the same values as in GTK3.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkwindow.h | 10 | ||||
-rw-r--r-- | gdk/win32/gdkwindow-win32.c | 8 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 13 |
3 files changed, 9 insertions, 22 deletions
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index 8692499268..c3f13b4a04 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -93,7 +93,6 @@ typedef enum * @GDK_WA_Y: Honor the Y coordinate field * @GDK_WA_CURSOR: Honor the cursor field * @GDK_WA_VISUAL: Honor the visual field - * @GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields * @GDK_WA_NOREDIR: Honor the override_redirect field * @GDK_WA_TYPE_HINT: Honor the type_hint field * @@ -111,9 +110,8 @@ typedef enum GDK_WA_Y = 1 << 3, GDK_WA_CURSOR = 1 << 4, GDK_WA_VISUAL = 1 << 5, - GDK_WA_WMCLASS = 1 << 6, - GDK_WA_NOREDIR = 1 << 7, - GDK_WA_TYPE_HINT = 1 << 8 + GDK_WA_NOREDIR = 1 << 6, + GDK_WA_TYPE_HINT = 1 << 7 } GdkWindowAttributesType; /* Size restriction enumeration. @@ -343,8 +341,6 @@ typedef enum * @visual: #GdkVisual for window * @window_type: type of window * @cursor: cursor for the window (see gdk_window_set_cursor()) - * @wmclass_name: don’t use (see gtk_window_set_wmclass()) - * @wmclass_class: don’t use (see gtk_window_set_wmclass()) * @override_redirect: %TRUE to bypass the window manager * @type_hint: a hint of the function of the window * @@ -361,8 +357,6 @@ struct _GdkWindowAttr GdkVisual *visual; GdkWindowType window_type; GdkCursor *cursor; - gchar *wmclass_name; - gchar *wmclass_class; gboolean override_redirect; GdkWindowTypeHint type_hint; }; diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 20ca3c3537..6d25baaeba 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -734,9 +734,9 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display, remaining_mask &= ~GDK_WA_NOREDIR; } - if ((remaining_mask & ~(GDK_WA_WMCLASS|GDK_WA_VISUAL|GDK_WA_CURSOR|GDK_WA_TITLE|GDK_WA_TYPE_HINT)) != 0) + if ((remaining_mask & ~(GDK_WA_VISUAL|GDK_WA_CURSOR|GDK_WA_TITLE|GDK_WA_TYPE_HINT)) != 0) g_warning ("_gdk_window_impl_new: uexpected attribute 0x%X", - remaining_mask & ~(GDK_WA_WMCLASS|GDK_WA_VISUAL|GDK_WA_CURSOR|GDK_WA_TITLE|GDK_WA_TYPE_HINT)); + remaining_mask & ~(GDK_WA_VISUAL|GDK_WA_CURSOR|GDK_WA_TITLE|GDK_WA_TYPE_HINT)); hparent = GDK_WINDOW_HWND (real_parent); @@ -752,10 +752,6 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display, impl->layered = FALSE; impl->layered_opacity = 1.0; - /* wclass is not any longer set always, but if is ... */ - if ((attributes_mask & GDK_WA_WMCLASS) == GDK_WA_WMCLASS) - g_assert ((attributes->wclass == GDK_INPUT_OUTPUT) == !window->input_only); - if (!window->input_only) { dwExStyle = 0; diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 14dfdd9255..a954c46c47 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1127,14 +1127,11 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display, gdk_window_set_title (window, title); - if (attributes_mask & GDK_WA_WMCLASS) - { - class_hint = XAllocClassHint (); - class_hint->res_name = attributes->wmclass_name; - class_hint->res_class = attributes->wmclass_class; - XSetClassHint (xdisplay, impl->xid, class_hint); - XFree (class_hint); - } + class_hint = XAllocClassHint (); + class_hint->res_name = (char *) g_get_prgname (); + class_hint->res_class = (char *) gdk_get_program_class (); + XSetClassHint (xdisplay, impl->xid, class_hint); + XFree (class_hint); setup_toplevel_window (window, window->parent); break; |