-
Notifications
You must be signed in to change notification settings - Fork 720
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
improve wayland compatibility #1548
base: master
Are you sure you want to change the base?
Conversation
this removes the x11 entanglements of goldedict at the expense of losing hotkey and scan popup functionality
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.
- What are the downsides of using GoldenDict with XWayland?
- Can the X11-specific code be disabled conditionally on native Wayland? Some of the functionality removed in this commit is nonessential. For instance, the users should be able to emulate the hotkeys by adding system keyboard (application) shortcuts. This emulation might actually turn out better, because currently not all key combinations work as hotkeys in practice. It may be possible to make the native-Wayland GD version work pretty well, in which case the changes could be merged into master.
- Does selection buffer work on Wayland? If not, this could be the most significant and difficult to overcome issue. What else doesn't work?
p.scanPopupModifiers += ui.leftCtrl->isChecked() ? KeyboardState::LeftCtrl: 0; | ||
p.scanPopupModifiers += ui.rightCtrl->isChecked() ? KeyboardState::RightCtrl: 0; | ||
p.scanPopupModifiers += ui.leftShift->isChecked() ? KeyboardState::LeftShift: 0; | ||
p.scanPopupModifiers += ui.rightShift->isChecked() ? KeyboardState::RightShift: 0; |
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.
This should be implementable on Wayland.
having to enable and allow xwayland which is an entire x11 server. the goal of wayland is to finally replace that and the existence of xwayland is to support transition for legacy applications until they are replaced or adapted. qt applications that have kept up with the development of the toolkit itself are already over that hill since the toolkit has first-class support for wayland. in case of goldendict, the x11 entanglements really are hacks that go around the toolkit and that's why they clashed with native wayland execution in the first place. from a design standpoint it is less-than-good practice, even if functionally necessary, to take these alternative routes
yes, it could be placed in
there is a clipboard mechanism in wayland implemented in the more popular compositors. there is no equivalent to (primary and secondary) selection buffers and it is specifically undesired as it is considered a grave security risk. central to wayland's design is that any inter-process communication (side-)channels opened by the gui should be regulated by the compositor so that gui isolation can be achieved if desired by the user (or broader system designers) |
Does the X11-specific workaround in This workaround in |
in achieving a "toggle window by global hotkey" function on native wayland is possible since swhkd exists already (https://github.com/waycrate/swhkd) and the toggle window action via tray icon works for both goldendict and keepassxc (both qt applications) so chaining these together one could get a hotkey translated to a regular window show/hide |
Haven't noticed this. I don't think removing this definition from goldendict.pro is a good idea. There is lots of code under that preprocessor variable that should work on native Wayland. I think Haven't found any mention of startup notifications in the swhkd repository. Either activating a window doesn't work on Plasma with default focus stealing prevention level or swhkd defeats them in a different way. |
@softmix , I wanna try this build for not stretched window (blurry text) in hidpi setup. One question, do you have any workaround for scan popup and activate goldendict main window hotkeys? Don't need to be full explanation. Any clue appreciated. |
@dontdieych, no. unfortunately not. i didn't use those features on x11 either |
ok
2022년 10월 15일 (토) 오전 12:44, softmix ***@***.***>님이 작성:
… One question, do you have any workaround for scan popup and activate
goldendict main window hotkeys? Don't need to be full explanation. Any clue
appreciated.
@dontdieych <https://github.com/dontdieych>, no. unfortunately not. i
didn't use those features on x11 either
—
Reply to this email directly, view it on GitHub
<#1548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRVI2MLRNJDZJ3RZMCZPI3WDF5XBANCNFSM6AAAAAAQI6IEAM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
With wayland this should be handled on compositor side, because goldendict wouldn't have access to global input. Maybe scan popup could be implemented too with a few cli options. |
to avoid outright crashes on native wayland, this removes the x11 entanglements of goldedict at the expense of losing hotkey and scan popup functionality
this branch can help users who wish to run goldendict on native wayland (rather than xwayland) do their dictionary lookups as before, although the x11 desktop integration is removed from it. it is a stopgap measure before wayland protocols are stabilized and can be relied on for providing desktop integration again. it is possible that these functionalities will not be implemented in any protocols, however