gtk/gdk/win32
Peter Clifton 7ee5e4f2c6 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-09-27 09:18:37 +02:00
..
rc Add git.mk to generate .gitignore files 2009-05-04 14:29:21 -04:00
bdfcursor.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
cursor.bdf Committing changes to the source bdf font file that I forgot to commit 2007-08-17 03:40:39 +00:00
gdkapplaunchcontext-win32.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkcolor-win32.c Do not use static GTypeInfo and GInterfaceInfo 2009-11-06 01:21:09 +01:00
gdkcursor-win32.c Rename static local functions and variables to not have any unnecessary _ 2009-01-21 20:51:22 +00:00
gdkdisplay-win32.c Add G_ENABLE_DEBUG #ifdef check in gdkdisplay-win32.c 2011-06-16 13:48:56 +08:00
gdkdnd-win32.c Don't use g_drag_context_ref 2010-05-30 02:23:03 -04:00
gdkdrawable-win32.c Win32: Ensure native back-end for windows where the user requests their handle 2011-09-27 09:15:36 +02:00
gdkdrawable-win32.h Use G_DEFINE_TYPE (GdkDrawableImplWin32, ...) 2009-07-26 19:14:07 +02:00
gdkevents-win32.c Remove superfluous call to _gdk_event_button_generate() 2011-09-05 01:33:29 +03:00
gdkfont-win32.c Bug 544684 - Win64 issue, window handles are assumed to be 32-bit 2008-08-04 23:21:36 +00:00
gdkgc-win32.c Do not use static GTypeInfo and GInterfaceInfo 2009-11-06 01:21:09 +01:00
gdkgeometry-win32.c win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos 2010-08-27 20:38:01 +02:00
gdkglobals-win32.c Work on OLE2-based generic DND 2009-12-16 13:10:21 +02:00
gdkim-win32.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkimage-win32.c Do not use static GTypeInfo and GInterfaceInfo 2009-11-06 01:21:09 +01:00
gdkinput-win32.c Avoid potential DLL hijacking in Wintab code 2010-09-09 20:21:03 +03:00
gdkinput-win32.h Initialize missing methods on Windows 2009-08-13 22:49:35 +03:00
gdkinput.c gdk: Use 'const' instead deprecated G_CONST_RETURN 2011-06-15 14:47:19 +01:00
gdkkeys-win32.c Fix a compatibility problem 2010-02-12 18:55:42 -05:00
gdkmain-win32.c Prefer MessageBeep() over Beep() 2010-11-07 22:38:20 +01:00
gdkpixmap-win32.c Do not use static GTypeInfo and GInterfaceInfo 2009-11-06 01:21:09 +01:00
gdkpixmap-win32.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkprivate-win32.h win32: resurect Windows clipboard selection notification 2011-06-10 01:22:49 +02:00
gdkproperty-win32.c gdk: Add XSetting for "gtk-cursor-blink-timeout" 2010-11-15 17:20:02 +00:00
gdkscreen-win32.c Implement gdk_screen_get_primary_monitor in all GDK backends 2009-12-13 20:40:02 -05:00
gdkselection-win32.c Work on OLE2-based generic DND 2009-12-16 13:10:21 +02:00
gdkspawn-win32.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdktestutils-win32.c New file, dummy implementations. 2007-11-25 22:25:18 +00:00
gdkvisual-win32.c Do not use static GTypeInfo and GInterfaceInfo 2009-11-06 01:21:09 +01:00
gdkwin32.h Deprecate foreign window apis 2010-12-21 09:54:14 -05:00
gdkwin32id.c Bug 544684 - Win64 issue, window handles are assumed to be 32-bit 2008-08-04 23:21:36 +00:00
gdkwindow-win32.c Win32: Fix _gdk_windowing_window_at_pointer to correctly return a toplevel 2011-09-27 09:18:37 +02:00
gdkwindow-win32.h Updates 2009-04-02 10:16:30 +02:00
libwntab32x.la Add headers. Add section about ActiveIMM. 2001-11-08 20:57:18 +00:00
Makefile.am Add git.mk to generate .gitignore files 2009-05-04 14:29:21 -04:00
makefile.msc Update mscv/win32 build 2010-08-27 20:34:23 +02:00
pktdef.h Build Wintab support always on Windows. Don't require the Wintab SDK. 2007-01-19 01:55:52 +00:00
wintab.h Build Wintab support always on Windows. Don't require the Wintab SDK. 2007-01-19 01:55:52 +00:00
xcursors.h Bug 544684 - Win64 issue, window handles are assumed to be 32-bit 2008-08-04 23:21:36 +00:00