"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gdk/win32/gdkdevice-win32.c" between
gtk+-3.24.26.tar.xz and gtk+-3.24.27.tar.xz

About: GTK+ 3 (the GIMP Toolkit; version 3) is a library for creating graphical user interfaces for the X Window System.

gdkdevice-win32.c  (gtk+-3.24.26.tar.xz):gdkdevice-win32.c  (gtk+-3.24.27.tar.xz)
skipping to change at line 153 skipping to change at line 153
if (root_x) if (root_x)
*root_x += _gdk_offset_x; *root_x += _gdk_offset_x;
if (root_y) if (root_y)
*root_y += _gdk_offset_y; *root_y += _gdk_offset_y;
} }
if (child_window) if (child_window)
{ {
hwndc = ChildWindowFromPoint (hwnd, point); if (window == gdk_screen_get_root_window (screen))
{
/* Always use WindowFromPoint when searching from the root window.
* Only WindowFromPoint is able to look through transparent
* layered windows.
*/
hwndc = GetAncestor (WindowFromPoint (point), GA_ROOT);
}
else
{
hwndc = ChildWindowFromPoint (hwnd, point);
}
if (hwndc && hwndc != hwnd) if (hwndc && hwndc != hwnd)
*child_window = gdk_win32_handle_table_lookup (hwndc); *child_window = gdk_win32_handle_table_lookup (hwndc);
else else
*child_window = NULL; /* Direct child unknown to gdk */ *child_window = NULL; /* Direct child unknown to gdk */
} }
if (root_window) if (root_window)
*root_window = gdk_screen_get_root_window (screen); *root_window = gdk_screen_get_root_window (screen);
skipping to change at line 204 skipping to change at line 215
GdkWindow * GdkWindow *
_gdk_device_win32_window_at_position (GdkDevice *device, _gdk_device_win32_window_at_position (GdkDevice *device,
gdouble *win_x, gdouble *win_x,
gdouble *win_y, gdouble *win_y,
GdkModifierType *mask, GdkModifierType *mask,
gboolean get_toplevel) gboolean get_toplevel)
{ {
GdkWindow *window = NULL; GdkWindow *window = NULL;
GdkWindowImplWin32 *impl = NULL; GdkWindowImplWin32 *impl = NULL;
POINT screen_pt, client_pt; POINT screen_pt, client_pt;
HWND hwnd, hwndc; HWND hwnd;
RECT rect; RECT rect;
GetCursorPos (&screen_pt); if (!GetCursorPos (&screen_pt))
return NULL;
hwnd = WindowFromPoint (screen_pt);
if (get_toplevel) if (get_toplevel)
{ {
/* Only consider visible children of the desktop to avoid the various /* Use WindowFromPoint instead of ChildWindowFromPoint(Ex).
* non-visible windows you often find on a running Windows box. These * Only WindowFromPoint is able to look through transparent
* might overlap our windows and cause our walk to fail. As we assume * layered windows.
* WindowFromPoint() can find our windows, we follow similar logic */
* here, and ignore invisible and disabled windows. hwnd = GetAncestor (hwnd, GA_ROOT);
*/
hwnd = GetDesktopWindow ();
do {
window = gdk_win32_handle_table_lookup (hwnd);
if (window != NULL &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_ROOT &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
break;
screen_to_client (hwnd, screen_pt, &client_pt);
hwndc = ChildWindowFromPointEx (hwnd, client_pt, CWP_SKIPDISABLED |
CWP_SKIPINVISIBLE);
/* Verify that we're really inside the client area of the window */
if (hwndc != hwnd)
{
GetClientRect (hwndc, &rect);
screen_to_client (hwndc, screen_pt, &client_pt);
if (!PtInRect (&rect, client_pt))
hwndc = hwnd;
}
} while (hwndc != hwnd && (hwnd = hwndc, 1));
} }
else
{
hwnd = WindowFromPoint (screen_pt);
/* Verify that we're really inside the client area of the window */ /* Verify that we're really inside the client area of the window */
GetClientRect (hwnd, &rect); GetClientRect (hwnd, &rect);
screen_to_client (hwnd, screen_pt, &client_pt); screen_to_client (hwnd, screen_pt, &client_pt);
if (!PtInRect (&rect, client_pt)) if (!PtInRect (&rect, client_pt))
hwnd = NULL; hwnd = NULL;
/* If we didn't hit any window at that point, return the desktop */ if (!get_toplevel && hwnd == NULL)
if (hwnd == NULL) {
{ /* If we didn't hit any window, return the root window */
window = gdk_get_default_root_window (); /* note that the root window ain't a toplevel window */
impl = GDK_WINDOW_IMPL_WIN32 (window->impl); window = gdk_get_default_root_window ();
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
if (win_x)
*win_x = (screen_pt.x + _gdk_offset_x) / impl->window_scale;
if (win_y)
*win_y = (screen_pt.y + _gdk_offset_y) / impl->window_scale;
return window; if (win_x)
} *win_x = (screen_pt.x + _gdk_offset_x) / impl->window_scale;
if (win_y)
*win_y = (screen_pt.y + _gdk_offset_y) / impl->window_scale;
window = gdk_win32_handle_table_lookup (hwnd); return window;
} }
window = gdk_win32_handle_table_lookup (hwnd);
if (window && (win_x || win_y)) if (window && (win_x || win_y))
{ {
impl = GDK_WINDOW_IMPL_WIN32 (window->impl); impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
if (win_x) if (win_x)
*win_x = client_pt.x / impl->window_scale; *win_x = client_pt.x / impl->window_scale;
if (win_y) if (win_y)
*win_y = client_pt.y / impl->window_scale; *win_y = client_pt.y / impl->window_scale;
} }
 End of changes. 10 change blocks. 
54 lines changed or deleted 40 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)