-
Notifications
You must be signed in to change notification settings - Fork 90
Fix mouse capture bugs and super-space problem on Wayland (ibus-lotus) #599
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: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,11 +124,6 @@ func (e *IBusBambooEngine) FocusIn() *dbus.Error { | |
| if e.config.IBflags&config.IBspellCheckWithDicts != 0 && len(dictionary) == 0 { | ||
| dictionary, _ = loadDictionary(DictVietnameseCm) | ||
| } | ||
| if inStringList(disabledMouseCapturingList, e.getWmClass()) { | ||
| stopMouseCapturing() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry if I'm missing something, what exactly is the problem with mouse capturing? Could you send me a link to the relevant discussion? tks
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On most modern desktop environments, they start replacing from X11 to Wayland. And you know, the mouse capturing in the code used xlib to capture mouse events and commit the text, this is pretty a bad idea as not only it doesn't work on Wayland but also causes some trouble like #487, I assume XWayland on GNOME Wayland is trying some way to get the permission to control the mouse by popping up that remote interaction dialog. |
||
| } else if e.config.IBflags&config.IBmouseCapturing != 0 { | ||
| startMouseCapturing() | ||
| } | ||
| fmt.Printf("WM_CLASS=(%s)\n", e.getWmClass()) | ||
| return nil | ||
| } | ||
|
|
@@ -141,7 +136,7 @@ func (e *IBusBambooEngine) FocusOut() *dbus.Error { | |
| func (e *IBusBambooEngine) Reset() *dbus.Error { | ||
| fmt.Print("Reset.\n") | ||
| if e.checkInputMode(config.PreeditIM) { | ||
| e.commitPreeditAndReset(e.getPreeditString()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when mouse capture is not active, and you're typing text in one location and then clicking elsewhere will commit any remaining buffered input at the new cursor position. That's annoying in x11.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's odd because my gnome wayland would automatically commit the text when i click my cursor elsewhere, even if the line Did you mean this line is X11 only?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's designed to work on x11 only. What do you think if we disable this entirely on wayland, but still active for X11 users?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well i'm not sure. I tried switching to an X11 desktop (GNOME 46 and Cinnamon) and the issue was the same as on Wayland. It duplicated two same words on two different cursor locations instead of "moved" the word from location A to location B like you said. Are you sure you are able reproduce the that x11 issue while mouse capture option is disabled? I doubt that you're using an older ibus version so that problem persists (mine is 1.5.33 and 1.5.29-rc2). Not too sure.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It has been a week and you haven't had any response to this. What do you think about integrating both features and let users choose whether one they want in the configuration window? It might be that your linux setup was too outdated, we could integrate that feature for users who like to keep their machine stable and outdated. But i would say, i wouldn't like that, it's a dirty workaround. What do you think? We can hold up this and discuss more if you want. But is it fine to merge the super-space fix on Wayland right now? |
||
| e.preeditor.Reset() | ||
| } | ||
| return nil | ||
| } | ||
|
|
@@ -333,17 +328,6 @@ func (e *IBusBambooEngine) PropertyActivate(propName string, propState uint32) * | |
| e.config.IBflags &= ^config.IBspellCheckWithDicts | ||
| } | ||
| } | ||
| if propName == PropKeyMouseCapturing { | ||
| if propState == ibus.PROP_STATE_CHECKED { | ||
| e.config.IBflags |= config.IBmouseCapturing | ||
| startMouseCapturing() | ||
| startMouseRecording() | ||
| } else { | ||
| e.config.IBflags &= ^config.IBmouseCapturing | ||
| stopMouseCapturing() | ||
| stopMouseRecording() | ||
| } | ||
| } | ||
| if propName == PropKeyMacroEnabled { | ||
| if propState == ibus.PROP_STATE_CHECKED { | ||
| e.config.IBflags |= config.IBmacroEnabled | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.