gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState

This state means that the toplevel window is presented as focused to the user,
i.e with active decorations under an X11 window manager.

If the GDK backend doesn't implement this flag, it will just remain set after
mapping the window.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
This commit is contained in:
Rui Matos 2011-10-28 23:21:04 +01:00
parent c1e8e7ba22
commit 43f1b5abbc
2 changed files with 4 additions and 2 deletions

View File

@ -371,6 +371,7 @@ typedef enum
* decorations.
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
* @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
*
* Specifies the state of a toplevel window.
*/
@ -382,7 +383,8 @@ typedef enum
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6
GDK_WINDOW_STATE_BELOW = 1 << 6,
GDK_WINDOW_STATE_FOCUSED = 1 << 7
} GdkWindowState;
/**

View File

@ -5184,7 +5184,7 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
if (!was_mapped)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_WITHDRAWN,
0);
GDK_WINDOW_STATE_FOCUSED);
}
else
{