mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
GDK W32: Don't handle WM_ACTIVATE for popup windows
Popups can't be active or inactive, so emitting GDK events in response to WM_ACTIVATE makes no sense for these kinds of GDK surfaces. The jury is still out on whether we should block (return 0) or ignore (don't return anything) this message. Blocking WM_NCACTIVATE (which we currently ignore) is definitely not an option - it completely breaks input somehow.
This commit is contained in:
parent
5ccb081fdb
commit
5ff7c3431b
@ -3430,6 +3430,16 @@ gdk_event_translate (MSG *msg,
|
||||
(LOWORD (msg->wParam) == WA_INACTIVE ? "INACTIVE" : "???"))),
|
||||
HIWORD (msg->wParam) ? " minimized" : "",
|
||||
(HWND) msg->lParam));
|
||||
if (window->surface_type == GDK_SURFACE_POPUP)
|
||||
{
|
||||
/* Popups cannot be activated or de-activated -
|
||||
* they only support keyboard focus, which GTK
|
||||
* will handle for us.
|
||||
*/
|
||||
*ret_valp = 0;
|
||||
return_val = TRUE;
|
||||
break;
|
||||
}
|
||||
/* We handle mouse clicks for modally-blocked windows under WM_MOUSEACTIVATE,
|
||||
* but we still need to deal with alt-tab, or with SetActiveWindow() type
|
||||
* situations.
|
||||
|
Loading…
Reference in New Issue
Block a user