gtk2/gdk
Peter Clifton 05e982a11a Win32: Fix _gdk_windowing_window_at_pointer to correctly return a toplevel
Commit 5ebb32d1ff didn't add the correct
code to find the toplevel window. The WindowFromPoint() function does
not return the toplevel window in the hierarchy, it returns the deepest
non-disabled, non-invisible child. As we don't use invisible or disabled
windows, we don't actually need to use the ChildWindowFromPoint walk for
the non get_toplevel case, so we can remove that code path.

To find a toplevel, we need to start from the desktop and work up, using
ChildWindowFromPointEx (to ignore invisible and disabled windows). If we
don't ignore invisible and disabled windows (as is the case with the
ChildWindowFromPoint call, we are liable to get returns of hidden or
disabled children of the desktop which don't belong to us, but notionally
occupy the same area under the pointer.

An alternative might be to start our walk with one of the children of the
desktop owned by our process and thread - which we can enumerate using,
the EnumThreadWindows call, or (presumably) determine internally. This
would not work when we are inside a GtkSocket though, as the children of
the desktop would belong to the process owning the GtkPlug - we would
have to rely on our own list of windows.

For correctness, this commit adds tests to ensure that we don't try to
return either x or y window coordinates if that corresponding pointer is
NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=658842
2011-11-10 17:40:50 +01:00
..
broadway broadway: Initial support fro V7+ websockets 2011-11-10 10:12:28 +01:00
quartz quartz: include all buttons' state in GdkEventMotion.state 2011-11-09 00:36:21 +01:00
tests Bump the version to 3.0.0 2011-02-10 14:41:02 -05:00
wayland Wayland: Adapt to GdkWindowImpl api change 2011-11-05 01:12:26 -04:00
win32 Win32: Fix _gdk_windowing_window_at_pointer to correctly return a toplevel 2011-11-10 17:40:50 +01:00
x11 x11: Implement GDK_WINDOW_STATE_FOCUSED on top of _NET_WM_STATE_FOCUSED 2011-11-08 19:33:22 +00:00
abicheck.sh Bump the version to 3.0.0 2011-02-10 14:41:02 -05:00
COPYING [ Merges from gtk-1-2 ] 1999-09-28 20:19:13 +00:00
gdk.c Drop references to g_thread_init() 2011-11-09 18:36:35 -05:00
gdk.h Remove gdk_spawn functions 2010-12-21 12:07:00 -05:00
gdk.symbols Add device-taking variants of begin_resize/move_drag 2011-11-05 01:10:16 -04:00
gdkapplaunchcontext.c Add deprecation guards for deprecated GdkAppLaunchContext API 2010-12-24 17:37:00 -05:00
gdkapplaunchcontext.h Drop use of GDK_DISABLE_DEPRECATED guards in gdk 2011-11-09 22:01:00 -05:00
gdkapplaunchcontextprivate.h Consistently hide class structs 2010-12-24 15:54:12 -05:00
gdkcairo.c More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkcairo.h More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkcolor.c More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkcolor.h More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkconfig.h.win32 gdk/gdkconfig.h.win32: Make it more up-to-date 2011-02-11 18:07:05 +08:00
gdkcursor.c [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
gdkcursor.h Drop use of GDK_DISABLE_DEPRECATED guards in gdk 2011-11-09 22:01:00 -05:00
gdkcursorprivate.h GdkCursor: Struct packing improvements 2011-04-12 12:13:55 -04:00
gdkdeprecated.c gdk: Move a bunch of deprecated code to a new file 2011-11-02 02:32:53 +01:00
gdkdevice.c GdkDevice: Remove duplicate private function 2011-04-08 16:39:45 +02:00
gdkdevice.h gdk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
gdkdevicemanager.c GdkDeviceManager: some reshuffling of docs 2011-11-04 23:38:11 -04:00
gdkdevicemanager.h Consistently hide class structs 2010-12-24 15:54:12 -05:00
gdkdevicemanagerprivate.h Fix up GDK docs 2010-12-25 00:02:39 -05:00
gdkdeviceprivate.h GdkDevice: Remove duplicate private function 2011-04-08 16:39:45 +02:00
gdkdisplay.c gdk: Move a bunch of deprecated code to a new file 2011-11-02 02:32:53 +01:00
gdkdisplay.h Drop use of GDK_DISABLE_DEPRECATED guards in gdk 2011-11-09 22:01:00 -05:00
gdkdisplaymanager.c gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway 2011-10-07 16:19:41 +02:00
gdkdisplaymanager.h Consistently hide class structs 2010-12-24 15:54:12 -05:00
gdkdisplaymanagerprivate.h Consistently hide class structs 2010-12-24 15:54:12 -05:00
gdkdisplayprivate.h gdk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
gdkdnd.c Fix a doc typo 2011-01-28 11:10:07 -05:00
gdkdnd.h API: gdk: Change get_drag_window() API 2011-02-01 18:51:57 +01:00
gdkdndprivate.h Fix up GDK docs 2010-12-25 00:02:39 -05:00
gdkenumtypes.c.template gdk/: fully remove gdkalias hacks 2010-07-10 02:21:31 +02:00
gdkenumtypes.h.template Remove remaining single-include guards 2010-06-04 19:40:43 -04:00
gdkevents.c Bug 659406 - Abstract what triggers a context menu 2011-09-27 15:45:18 +02:00
gdkevents.h gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState 2011-11-08 19:25:51 +00:00
gdkglobals.c gdk: Add GDK_RENDERING environment variable 2011-03-11 02:10:47 +01:00
gdkinternals.h GdkWindow: Struct packing improvements 2011-04-12 12:13:55 -04:00
gdkintl.h Fix distcheck 2010-10-01 20:02:35 -04:00
gdkkeynames.c Implement keyval vfuncs for quartz 2010-12-22 17:47:00 +01:00
gdkkeys.c gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway 2011-10-07 16:19:41 +02:00
gdkkeys.h Bug 659602 - Provide an abstraction for the platform's use of modifier keys 2011-09-27 09:56:25 +02:00
gdkkeysprivate.h gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway 2011-10-07 16:19:41 +02:00
gdkkeysyms-compat.h GDK: Prefix key names with KEY_ 2010-09-08 18:51:44 -04:00
gdkkeysyms-update.pl GDK: Prefix key names with KEY_ 2010-09-08 18:51:44 -04:00
gdkkeysyms.h gdk: Update keysyms list from latest X.org headers 2011-06-06 21:15:53 -04:00
gdkkeyuni.c gdkkeyuni: Fix DEL for binary search 2011-03-16 20:09:13 -04:00
gdkmain.h Drop use of GDK_DISABLE_DEPRECATED guards in gdk 2011-11-09 22:01:00 -05:00
gdkmarshalers.list Bug 631599 - Allow to use arbitrary surfaces for offscreen windows 2010-10-14 13:25:23 +02:00
gdkoffscreenwindow.c Fixed bug #654125 "gdkoffscreenwindow set any impl handlers to null but adhoc gdk_window_set_* do not cope" 2011-07-08 19:27:00 -03:00
gdkpango.c Don't use deprecated Pango api 2011-11-01 21:13:35 -04:00
gdkpango.h API: remove GdkPangoRenderer 2010-08-10 21:02:29 +02:00
gdkpixbuf-drawable.c More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkpixbuf.h More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkprivate.h gdk: Remove useless macros from gdkprivate.h 2010-12-02 20:21:05 +01:00
gdkproperty.h Deal with property encoding functions 2010-12-21 12:07:03 -05:00
gdkrectangle.c [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
gdkrectangle.h Inclusion cleanups in headers 2010-10-14 22:08:53 -04:00
gdkrgba.c More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkrgba.h More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
gdkscreen.c Documentation fixes 2011-09-25 21:04:49 -04:00
gdkscreen.h gdk: Remove GdkEventClient 2011-02-01 06:33:02 +01:00
gdkscreenprivate.h GdkScreen: Struct packing improvements 2011-04-12 12:13:55 -04:00
gdkselection.c API: gdk: Make GdkEventSelection.requestor a GdkWindow 2011-02-01 18:51:57 +01:00
gdkselection.h API: gdk: Make GdkEventSelection.requestor a GdkWindow 2011-02-01 18:51:57 +01:00
gdktestutils.h docs: move documentation to inline comments: gdktesting 2010-11-15 04:12:57 +01:00
gdkthreads.h docs: Move documentation to inline comments: gdkthreads 2010-11-15 21:06:35 +01:00
gdktypes.h Bug 659602 - Provide an abstraction for the platform's use of modifier keys 2011-09-27 09:56:25 +02:00
gdkvisual.c [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
gdkvisual.h Consistently hide class structs 2010-12-24 15:54:12 -05:00
gdkvisualprivate.h Fix up GDK docs 2010-12-25 00:02:39 -05:00
gdkwindow.c gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState 2011-11-08 19:25:51 +00:00
gdkwindow.h Add device-taking variants of begin_resize/move_drag 2011-11-05 01:10:16 -04:00
gdkwindowimpl.c gdk: Move window beeps into GdkWindowImpl 2010-12-02 20:21:05 +01:00
gdkwindowimpl.h Add device-taking variants of begin_resize/move_drag 2011-11-05 01:10:16 -04:00
gdkx.h gdk: Fix typo 2011-01-11 17:06:49 +01:00
gen-keyname-table.pl gdk: Make gen-keyname-table.pl work again 2011-10-26 10:36:43 +01:00
keyname-table.h Add translation entries for more common keysyms 2011-02-04 15:33:36 -05:00
keynames-translate.txt gdk: Translate keyboard brightness keys 2011-10-26 10:36:43 +01:00
keynames.txt Mark arrow keys as translatable 2006-12-21 05:11:00 +00:00
Makefile.am gdk: Move a bunch of deprecated code to a new file 2011-11-02 02:32:53 +01:00
makefile.msc win32: gdk3 resurrection 2011-01-02 13:33:04 +01:00