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

Pointer constraints #174

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Pointer constraints #174

merged 1 commit into from
Sep 29, 2023

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Sep 14, 2023

Depends on Smithay/smithay#872.

For some reason, pointer confinement isn't working correctly here at the moment, even though the code matches Anvil...

May need solution to Smithay/smithay#1126 for behavior to be correct.

@ids1024 ids1024 force-pushed the pointer-constraints_jammy branch from d7c92bf to a789a4e Compare September 21, 2023 22:17
@ids1024
Copy link
Member Author

ids1024 commented Sep 21, 2023

Updated to make use of Smithay/smithay#1137. Seems to be working fairly well now. In earlier versions I had an issue with applications that I think the frame changes fix.

@ids1024 ids1024 force-pushed the pointer-constraints_jammy branch from a789a4e to 2d0494e Compare September 22, 2023 15:29
@ids1024 ids1024 marked this pull request as ready for review September 22, 2023 15:30
@ids1024 ids1024 changed the title WIP pointer constraints Pointer constraints Sep 22, 2023
@ids1024 ids1024 marked this pull request as draft September 22, 2023 15:51
@ids1024
Copy link
Member Author

ids1024 commented Sep 22, 2023

Hm, looks like this introduces an issue with moving the pointer between monitors...

@ids1024 ids1024 force-pushed the pointer-constraints_jammy branch from 2d0494e to dfdab66 Compare September 22, 2023 16:05
@ids1024 ids1024 marked this pull request as ready for review September 22, 2023 16:07
@ids1024
Copy link
Member Author

ids1024 commented Sep 22, 2023

Okay, just needed to move the output_geometry clamping to use the new output when the cursor has moved.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Looks pretty good, just some interactions around compositor-drawn/managed objects, where I am not certain this is a 100% correct.

src/shell/element/stack.rs Show resolved Hide resolved
@Vixea
Copy link

Vixea commented Sep 23, 2023

I'm 100% certain that it's not correct I tested the pr for the lols, it crashes whenever the cursor interacts with compositor related objects(not always in all cases though)

@Vixea
Copy link

Vixea commented Sep 24, 2023

Ok figured out one reproduction case moving the pointer to the edge of the primary screen on the right side or in this case the side that doesn't have a second monitor

@ids1024
Copy link
Member Author

ids1024 commented Sep 25, 2023

@Vixea Good catch. Looks like these a possible panic in the clamp call since I didn't put things in the right order there... that part is easy enough, anyway.

@Vixea
Copy link

Vixea commented Sep 25, 2023

Huh, whenever clicking on windows that use pointer constraints when constrained the cursor jumps to look straight down(apps in question are games) though maybe that is a relative pointer bug... hmm.

@ids1024
Copy link
Member Author

ids1024 commented Sep 25, 2023

Hm, I had some weird behavior like that before, but it seemed to not be a problem in this PR. But I just tested OpenMW. I'll have to try some other things.

@Vixea
Copy link

Vixea commented Sep 25, 2023

I used Minecraft though I've found some other regressions that I think were caused by the fullscreen/maximize refractors

@ids1024
Copy link
Member Author

ids1024 commented Sep 27, 2023

I guess I was just moving around and didn't even end up clicking in my quick test... seems there's an issue in Smithay here: Smithay/smithay#1148.

That wasn't happening in anvil since it's missing a call to frame (Smithay/smithay#1149).

@Drakulix Drakulix force-pushed the pointer-constraints_jammy branch from de5b282 to 373af07 Compare September 29, 2023 17:21
@Drakulix Drakulix merged commit d051f41 into master_jammy Sep 29, 2023
1 check passed
@jackpot51 jackpot51 deleted the pointer-constraints_jammy branch September 29, 2023 18:42
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.

3 participants