[gtk+] API: gdk: Remove override_redirect flag from GdkWindowAttr
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: gdk: Remove override_redirect flag from GdkWindowAttr
- Date: Sat, 5 Nov 2016 02:36:20 +0000 (UTC)
commit b9955cfff1a2290c7826565049c934d237e9028f
Author: Benjamin Otte <otte redhat com>
Date: Fri Nov 4 03:35:49 2016 +0100
API: gdk: Remove override_redirect flag from GdkWindowAttr
When you want an override-redirect window, you create it that way by
creating a GDK_WINDOW_TEMP window.
gdk/broadway/gdkwindow-broadway.c | 3 +--
gdk/gdkwindow.h | 6 +-----
gdk/win32/gdkwindow-win32.c | 4 ++--
gdk/x11/gdkwindow-x11.c | 14 ++------------
gtk/gtkinvisible.c | 3 +--
gtk/gtkmenu.c | 3 +--
6 files changed, 8 insertions(+), 25 deletions(-)
---
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index 28e5733..596ed6d 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -1304,10 +1304,9 @@ create_moveresize_window (MoveResizeData *mv_resize,
attributes.height = 10;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_ONLY;
- attributes.override_redirect = TRUE;
attributes.event_mask = 0;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
mv_resize->moveresize_emulation_window =
gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (mv_resize->display)),
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 9d4535b..3144aa1 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -88,7 +88,6 @@ typedef enum
* @GDK_WA_TITLE: Honor the title field
* @GDK_WA_X: Honor the X coordinate field
* @GDK_WA_Y: Honor the Y coordinate field
- * @GDK_WA_NOREDIR: Honor the override_redirect field
* @GDK_WA_TYPE_HINT: Honor the type_hint field
*
* Used to indicate which fields in the #GdkWindowAttr struct should be honored.
@@ -103,8 +102,7 @@ typedef enum
GDK_WA_TITLE = 1 << 1,
GDK_WA_X = 1 << 2,
GDK_WA_Y = 1 << 3,
- GDK_WA_NOREDIR = 1 << 4,
- GDK_WA_TYPE_HINT = 1 << 5
+ GDK_WA_TYPE_HINT = 1 << 4
} GdkWindowAttributesType;
/* Size restriction enumeration.
@@ -333,7 +331,6 @@ typedef enum
* window that receives events)
* @window_type: type of window
* @cursor: cursor for the window (see gdk_window_set_cursor())
- * @override_redirect: %TRUE to bypass the window manager
* @type_hint: a hint of the function of the window
*
* Attributes to use for a newly-created window.
@@ -347,7 +344,6 @@ struct _GdkWindowAttr
gint height;
GdkWindowWindowClass wclass;
GdkWindowType window_type;
- gboolean override_redirect;
GdkWindowTypeHint type_hint;
};
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index bfd9c21..d21ce02 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -732,9 +732,9 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
remaining_mask &= ~GDK_WA_Y;
}
- if ((remaining_mask & ~(GDK_WA_NOREDIR|GDK_WA_TITLE|GDK_WA_TYPE_HINT)) != 0)
+ if ((remaining_mask & ~(GDK_WA_TITLE|GDK_WA_TYPE_HINT)) != 0)
g_warning ("_gdk_window_impl_new: uexpected attribute 0x%X",
- remaining_mask & ~(GDK_WA_NOREDIR|GDK_WA_TITLE|GDK_WA_TYPE_HINT));
+ remaining_mask & ~(GDK_WA_TITLE|GDK_WA_TYPE_HINT));
hparent = GDK_WINDOW_HWND (real_parent);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 981405d..1f56bc9 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -933,16 +933,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
xvisual = gdk_x11_display_get_window_visual (display_x11);
- if (attributes_mask & GDK_WA_NOREDIR)
- {
- xattributes.override_redirect =
- (attributes->override_redirect == FALSE)?False:True;
- xattributes_mask |= CWOverrideRedirect;
- }
- else
- xattributes.override_redirect = False;
-
- impl->override_redirect = xattributes.override_redirect;
+ impl->override_redirect = FALSE;
/* Sanity checks */
switch (window->window_type)
@@ -4837,10 +4828,9 @@ create_moveresize_window (MoveResizeData *mv_resize,
attributes.height = 10;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_ONLY;
- attributes.override_redirect = TRUE;
attributes.event_mask = 0;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
mv_resize->moveresize_emulation_window =
gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (mv_resize->display)),
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 5d07914..ebea8b9 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -246,10 +246,9 @@ gtk_invisible_realize (GtkWidget *widget)
attributes.height = 10;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_ONLY;
- attributes.override_redirect = TRUE;
attributes.event_mask = gtk_widget_get_events (widget);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
window = gdk_window_new (parent, &attributes, attributes_mask);
gtk_widget_set_window (widget, window);
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 91977cb..c7e65af 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2677,10 +2677,9 @@ menu_grab_transfer_window_get (GtkMenu *menu)
attributes.height = 10;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_ONLY;
- attributes.override_redirect = TRUE;
attributes.event_mask = 0;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
parent = gdk_screen_get_root_window (gtk_widget_get_screen (GTK_WIDGET (menu)));
window = gdk_window_new (parent,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]