diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-12-10 23:58:23 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-12-10 23:58:23 +0000 |
commit | 5fb61f307553d9455240315f79923fbbf71bfeba (patch) | |
tree | 2cb5c7df896d7dc4de690c2d8a69a12526daeee3 /gdk/win32 | |
parent | c9c99b3f1b96cef1863503612e6c2689ae2ebbe6 (diff) | |
download | gdk-pixbuf-5fb61f307553d9455240315f79923fbbf71bfeba.tar.gz |
Changes to allow "no input" windows (#64613):
Thu Dec 11 00:35:12 2003 Matthias Clasen <maclas@gmx.de>
Changes to allow "no input" windows (#64613):
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a new boolean
field accept_focus.
* gdk/gdkwindow.h (gdk_window_set_accept_focus): New function to
set it.
* gtk/gtkwindow.[hc]: Add a boolean property "accept_focus"
and gtk_window_get_focus() and gtk_window_set_focus().
* gdk/win32/gdkwindow-win32.c (gdk_window_new):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_new):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_new):
Initialize the accept_focus field to TRUE.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_accept_focus):
* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_accept_focus):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_accept_focus):
Implementations for the various backends. The Win32 and linux-fb
implementations set the accept_focus field, but don't use it yet
to actually implement noinput windows. The X implementation updates
the WM_HINTS to select the globally active input model (see the
ICCCM) if accept_focus is FALSE.
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Ignore the
WM_TAKE_FOCUS message if accept_focus is FALSE.
Diffstat (limited to 'gdk/win32')
-rw-r--r-- | gdk/win32/gdkwindow-win32.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 640eaccf3..7f28f8ae0 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -468,6 +468,8 @@ gdk_window_new (GdkWindow *parent, private->parent = (GdkWindowObject *)parent; + private->accept_focus = TRUE; + if (attributes_mask & GDK_WA_X) private->x = attributes->x; else @@ -2151,6 +2153,22 @@ gdk_window_set_override_redirect (GdkWindow *window, g_warning ("gdk_window_set_override_redirect not implemented"); } +void +gdk_window_set_accept_focus (GdkWindow *window, + gboolean accept_focus) +{ + GdkWindowObject *private; + g_return_if_fail (window != NULL); + g_return_if_fail (GDK_IS_WINDOW (window)); + + private = (GdkWindowObject *)window; + + accept_focus = accept_focus != FALSE; + + if (private->accept_focus != accept_focus) + private->accept_focus = accept_focus; +} + void gdk_window_set_icon_list (GdkWindow *window, GList *pixbufs) |