-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implement new Input Capture protocol #7919
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
base: main
Are you sure you want to change the base?
Conversation
95c44f6 to
d22653e
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
Idk when it will be finished. if you need it, build it yourself |
|
With your fork, will kvm software such as input leap work out of the box? |
|
Yes and i am it to test |
|
wow it was really troublesome compiling xdg-desktop-portal-hyprland. have to copy over the protocol to my /usr/share/hyprland-protocols(or clone it there), or i just removed the if line and forced it to get it from the repo. but, it seems to just fail in input-leap: it was giving a error that it cant find the input-leap location before installing your hyprland & xdg-desktop-portal-hyprland fork. that error is gone. but still failed. |
|
Its strange that you have to copy the protocol file over, did you clone the submodules ? ( |
its the cmakelist file, it tried to grab from /usr/share/hyprland-protocols if exist, which doesn't have your protocol as it's not merged in the hyprland-protocol repo, thus i made it only grab from the gh repo. i see, ill try that EDIT: in the install(from README: HOLLY! wow, not sure why, but i re-builded it and reinstalled it. and it WORKS! ty! A suggestion is that, disable this when mouse or keyboard is being capture/binded by programs(e.g. games that uses mouse to move camera) After two days of use. those are some feedbacks: this is what im using: but i have the following issues:
|
|
Thanks for the feedback tho i didn't encounter most of the issues you describe, but i will try to investigate it. |
|
alright. ty! Appreciate it! |
29214bb to
189f615
Compare
|
The latest commit added a new shortcut: Personally, I bind it like this: |
|
Nice! I'm currently on vacation without my laptop, so I'll try it when I get back EDIT: Now i tried it, the new dispatcher works! ill try it when it locks down hyprland again and see if it works then |
if thats not possible then maybe add a dispatcher so user can script it to do so |
trim.44B51EBB-2916-40A4-BFBB-7EBA4AF42874.MOV |
You mean if a 3d game has kinda the mouse captured and move it to a border the input is captured and should not ? |
If you have any steps to reproduce it it will be great |
yes, for example my macbook is left, and i moved my cursor in game(that i captured) to left, it will eventually go to my mac screen. It does this in X11 too, but hoping it gets fixed as its unintended behavior and is very annoying since i have to quit my kvm software(input leap) in order to play games properly |
|
It is quite strange that you where able to still move the mouse in your primary computer. |
|
not sure, it just happend randomly, but before it happend, i was impl a new feature and was opening a nested Hyprland, but i wont try again today cuz it's pretty late and ill sleep |
related: https://www.reddit.com/r/kde/comments/u34lg0/wayland_gaming_and_mouse_capture/ |
vaxerski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant comment on the tracy submodule bump: pls remov
overall nice work!
|
Also can bump required h-p in cmake + meson to 0.7.0 now https://github.com/hyprwm/hyprland-protocols/releases/tag/v0.7.0 |
|
CI Nix builds seems to be borken because hyprland protocols is not up to date idk why |
Should work now. |
4baaff6 to
0de897d
Compare
8cf19ea to
1d4404d
Compare
vaxerski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm other than style.
Would it be feasible to write some tests for this? I don't know what the libei space looks like and if it's easy to write a simple client to send some requests
| eis_device* keyboard = nullptr; | ||
| } m_client; | ||
|
|
||
| wl_event_source* m_eventSource; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uninitialized primitive
| if (!DISALLOWACTION) | ||
| passEvent = g_pKeybindManager->onKeyEvent(event, pKeyboard); | ||
| passEvent = g_pKeybindManager->onKeyEvent(event, pKeyboard) && !PROTO::inputCapture->isCaptured(); | ||
| ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops?
| m_passPressed = sc<int>(pressed); | ||
|
|
||
| // We only process the releaseinputcapture dispatcher when input capture is active | ||
| if (PROTO::inputCapture->isCaptured() && k->handler != "releaseinputcapture") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no {}
| std::vector<UP<CHyprlandInputCaptureManagerV1>> m_vManagers; | ||
| std::vector<SP<CInputCaptureResource>> m_Sessions; | ||
| SP<CInputCaptureResource> active = nullptr; | ||
| std::vector<SBarrier> barriers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot m_
|
|
||
| // | ||
|
|
||
| std::string socketPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot m_
I can try at least |
|
would be great, thanks. |
|
I tried to compile this PR to setup a laptop but currently I think something changed because it currently does not compile without errors. How is this going? Great work, just asking out of curiosity 😁 |
|
@3l0w apologize for pinging again, but do you need some help here? Can we take-over some bits anyhow just to speed things up a bit? :) |
|
Yeah maybe, i don't have the time right now to make the tests vaxerski ask, i will try to do today or tomorrow a rebase tho |
1d4404d to
d445bdf
Compare
|
if you don't have the time for tests that's okay, if enough people test this by using it we can merge. Leave a 👍 under this comment if you've ran this and tested working. If I don't come back here within a few days, feel fre to tag me. :) |
|
Don't merge yet, i need to test a few issues that people seems to have encounter, i will tag you when its ready again |


Describe your PR, what does it fix/add?
This PR implements the input capture protocol defined in hyprwm/hyprland-protocols#8.
It also fixed a bug where
wl_output::geometryxandyarguments where always 0.The
wl_output::geometryevent is now sent when the output layout change (Help to followxandymodifications).Is it ready for merging, or does it need work?
It still need work, like sending the keyboard layout.
TODO List: