Skip to content
Snippets Groups Projects
Commit 8d576257 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

panel: Block autohide when the panel has input focus

The autohide algorithm implicitly assumes that the active window is a
foreign window, but it may in fact be the panel itself (at least on
X11). This is the case, for example, if the panel has input focus via a
plugin's GtkEntry.

In this case, the algorithm gives a hazardous result, and may in
particular enter an infinite loop in certain circumstances.

Blocking autohide if the panel has input focus allows to exit the
algorithm as quickly as possible at its various entry points, thus
resolving this problem. It also ensures that the panel is not hidden
while the user is typically typing text into a GtkEntry.

Finally, even if autohide is not used, this ensures that panel opacity
is correctly updated, since panel enter/leave opacities follow the same
logic as autohide.

Fixes: #764
parent 60d7036d
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment