[Webkit-unassigned] [Bug 212581] [GTK4] Monitor root window to update activity state
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 1 05:36:45 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=212581
--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Adrian Perez from comment #3)
> Comment on attachment 400703 [details]
> Patch
>
> Patch looks good, there's just one small wrinkle (please read below)
> and a nit, otherwise I would have approved it already :]
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=400703&action=review
>
> > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:1715
> > + if (isActive && !gtk_widget_get_visible(GTK_WIDGET(window)))
>
> This will return early if the window is not visible, regardless of
> its activity status. I think the code would be clearer if it checked
> the window visibility first and returned early in that case. Something
> like this:
>
> if (!gtk_widget_get_visible(GTK_WIDGET(window))
> return;
>
> const bool isActive = gtk_window_is_active(window);
> // ...
This comes from GTK3 code, where this early return only happens in the focus-in, and includes this comment:
// Spurious focus in events can occur when the window is hidden.
I don't even know if that's the case with GTK4, so I think I'm going to assume a hidden toplevel can't get the focus.
> > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:1735
> > + bool visible = !(state & GDK_SURFACE_STATE_MINIMIZED);
>
> This should check also for GDK_SURFACE_STATE_WITHDRAWN,
> which indicates that the surface is not being shown.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200601/b8da387a/attachment.htm>
More information about the webkit-unassigned
mailing list