3 ms·
That doesn't seem like something that an application should be getting involved with. An application should only be able to manage its own windows and key press
by chrisseaton 6y ago
That doesn't seem like something that an application should be getting involved with. An application should only be able to manage its own windows and key presses to its own window.
- R0b0t1 6y agoProblematic. Means you are relying on the DE for all UI development. With Windows and X11 the DE is reconfigurable to some extent by applications. There is also more to this, showing the Wayland security model is incoherent. If debugging is enabled on your system I can simply debug your root terminal and start injecting commands into memory.
- zxzax 6y agoWayland obviously cannot solve all security issues and privilege escalations in the underlying OS -- the solution to that problem would be to just disable debugging within that security context. In Wayland the situation is also not so much different from Windows, you would just reconfigure and extend the DE itself. You are already relying on them to provide most of the UI to an extent.
- R0b0t1 6y agoIn regards to your first point, I am saying that Wayland does not do what it sets out to do and the proper way of doing it is a much larger problem than what Wayland can address. It is possibly better to avoid breaking everyone's stuff if you're just going to need to shortly do it again to fix the things Wayland does not and can not fix. For your latter point, Wayland is much different. In Windows there are ways to inject behavior into other programs or the UI elements. This exists so you can change the UI. Wayland's idea of security is very much against that, at least in the way it can be done on Windows/X11.
- zxzax 6y agoI don't know what you mean you'll need to break it again, this one particular hole is already plugged in Wayland. That won't cause additional breakage, and you'll still want to be plugging those additional holes like ptrace anyway. Input injection is being worked on in a different library, that brings a standard API that's supposed to work the same across Wayland, X11, and with sandboxed contexts: https://gitlab.freedesktop.org/libinput/libei https://gitlab.freedesktop.org/libinput/libei
- reificator 6y agoSo if I'm in my text editor and decide I want to change the currently playing song, I need to switch windows/contexts, press a hotkey or GUI button, and switch back? The current model where everything running can listen to everything you do is not acceptable, but that doesn't mean there's no usecases that strongly benefit from global hotkeys.
- chrisseaton 6y ago> So if I'm in my text editor and decide I want to change the currently playing song, I need to switch windows/contexts, press a hotkey or GUI button, and switch back? Looks to me like something the DE should manage for you, not the application. But everyone seems to disagree with me!
- TeMPOraL 6y agoBut how do you teach your DE to do new things for you? And what is your DE in the first place? The answer to both these questions is: an application. Think of applications hooking into global shortcuts as plugins for your DE.
- reificator 6y ago> Looks to me like something the DE should manage for you, not the application. > But everyone seems to disagree with me! The original post you responded to was suggesting that your DE, or at least something outside of your application, provide an API to register specific global hotkeys that you can listen for. In response, you said: > Why would you ever let a non-focused application subscribe to any key combinations? So to me when reading this thread, it looks like you're the one disagreeing with this idea. This is the first post of yours I've seen where you suggest this, and the thread begins with you shooting down the entire concept as ridiculous. Unless you're suggesting that the DE comes with a preconfigured set of global hotkeys and cannot be altered or extended, nor handled differently by different applications. In which case yes, I strongly disagree with that. There's a reasonable middleground between a free-for-all and nothing but what the DE already thought of, and that's a well-defined API boundary alongside per-application, per-feature permissions. Bonus points if the DE handles all key-combination assignment in a consistent UI and applications can only register a suggested keycombo, a context for when the hotkey should be activated, and a function to respond to the event.
- TeMPOraL 6y agoDepends on an application. Plenty of applications have a legitimate reason to hook into global keyboard handlers, or otherwise instrument other applications or the system itself. Removing that capability would be crippling to the utility of a computer. It sort of works in the mobile space (+/- accessibility services, which are the way to get that functionality if you need it), but that's only because mobile devices are consumption-oriented; there's only so much you can do with them, and they eschew utility in order to streamline you into being monetized by third-party services.
- simion314 6y agoNot all applications need to be a classic "windowed application". I know this is a rare use case, but the DE and the app need to work togheter to allow global shortcuts. I for example have a keyboard with many useless media keys , that I configured to run some specific scripts and some I could very easy set them up as Global shortcuts for some KDE apps. Not sure if other DEs would offer to setup global shortcuts for you. Probably something most users will use is screen recordings and screen readers , this applications need to have global shortcuts(and access to the screen and window elements)