gtk: implement global shortcuts#7083
Conversation
|
I wonder what the diff would look like if we used libportal |
|
Well... libportal doesn't implement this yet, and it doesn't seem like anyone else is interested. (There's an open PR from July 2024, but nobody's left a single comment yet: flatpak/libportal#153) Would make my day a whole lot easier if it were the case to be honest It also would've been a lot easier if they made the API extensible so that you could write your own portal extensions via libportal, but sadly we can't have nice things |
2479f30 to
620e718
Compare
mitchellh
left a comment
There was a problem hiding this comment.
Excellent work. That fact it's so encapsulated is really well done. I agree with @tristan957 on the test request for the one function, then I just hit the "red" button to consider the ArrayHashMap change.
| var trigger_buf: [256]u8 = undefined; | ||
|
|
||
| self.map.clearRetainingCapacity(); | ||
| var it = self.app.config.keybind.set.bindings.iterator(); |
There was a problem hiding this comment.
Note to self: create better API for this, I don't think the apprt's should be doing this level of introspection. Its totally fine for this PR, but I'll get around to a better API soon, because its in the hot path of me implementing global shortcuts on macOS that don't require special permissions (that they do today).
620e718 to
6f1521b
Compare
6f1521b to
646dbf8
Compare
|
Trying out now with Gnome 48 and I'm getting the following crash: |
|
Hmmm.. I'm running into the same error. Lemme see here |
|
This seems to fix it: |
It's been a lot of D-Bus related pain and suffering, but here it is. I'm not sure about how well this is integrated inside App, but I'm fairly proud of the standalone logic.
Compiling this list of known supported and unsupported platforms has been amazingly painful. Never change, Linux desktop.
646dbf8 to
6827dc0
Compare
|
Works in my VM testing on both GNOME 48 and Plasma 6.3, NixOS unstable (25.11). @jcollie Can you see if it works on your end? |
YESSS!!!! working for me now! |
|
Let's do this |
It's been a lot of D-Bus related pain and suffering, but here it is.
I'm not sure about how well this is integrated inside App, but I'm fairly
proud of the standalone logic.