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.
This commit is contained in:
Benjamin Otte 2016-11-04 03:35:49 +01:00
parent 33e7a7898f
commit b9955cfff1
6 changed files with 8 additions and 25 deletions

View File

@ -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)),

View File

@ -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;
};

View File

@ -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);

View File

@ -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)),

View File

@ -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);

View File

@ -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,