Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle fullscreen windows in vectorToWindowIdeal #4021

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

dranull
Copy link
Contributor

@dranull dranull commented Dec 1, 2023

Describe your PR, what does it fix/add?

Clicking in a fullscreen window over the decoration area (gaps, border, groupbar) of other windows will pass the mousedown event to the other window in some cases.

Example: With two (or more) tiled windows on a workspace, activating fullscreen for one of them, then clicking over the area where another window had a groupbar (or when using no_gaps_when_only = yes with resize_on_border = yes) wasn't possible (it was interactive with the groupbar).
Most notable annoyances were the inability to click on browser tabs, or to simply drag the scrollbars.

Problem: m_vWindows is sorted from bottom to top. Fullscreening a window will put it at the end of that list, so it will be always the last to be checked. However, other tiled windows can be under the cursor at the same time (beneath the fullscreen window), and if one matches, vectorToWindowIdeal will return it first.

Solution: check in reverse order, so the top window will be returned first, or first check for fullscreen windows on the workspace.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I've left some other minor changes in the code, while testing, if you don't mind.
Also, most probably fixes #2847.

Is it ready for merging, or does it need work?

I guess.

src/Compositor.cpp Outdated Show resolved Hide resolved
vaxerski
vaxerski previously approved these changes Dec 2, 2023
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, lgtm.

Tiled windows should never be focused if there is a fullscreen one :)

@dranull
Copy link
Contributor Author

dranull commented Dec 2, 2023

Sure, but I was thinking about an edge case, like this:
HDMI-A-1_2023-12-02_16-07-12
But it turns out, even fake fullscreen will make the popup completely disappear. I should have tried...

@vaxerski vaxerski merged commit 59cb0e2 into hyprwm:main Dec 3, 2023
10 checks passed
@fharsanto
Copy link

Just FYI,
hello @vaxerski, this version make screensharing in OBS / zoom / brave-bin is not work (blackscreen).

OS: Arch linux

Now i'm using this version for working screensharing 23942fa

Hyprland, built from branch HEAD at commit 23942fa4d684a11322ae19187364a87a8b1a0271 dirty (fix 2456).
Tag: v0.32.3-97-g23942fa4

2023-12-04T00:22:38,895927880+07:00

@vaxerski
Copy link
Member

vaxerski commented Dec 3, 2023

I don't think it's related to this mr.

@dranull dranull deleted the fix-fs1_clicks branch December 4, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't click menu bar of flatpak apps in full-screen mode due to gaps
3 participants