emacs-eaf / emacs-application-framework

EAF, an extensible framework that revolutionizes the graphical capabilities of Emacs
GNU General Public License v3.0
3.06k stars 232 forks source link

M- and C- key chords do not work when in EAF/Browser on emacs 26.3 over x2go #291

Closed PerlStalker closed 4 years ago

PerlStalker commented 4 years ago

I'm using EAF from git (downloaded today) with emacs 26.3 over x2go. Using M-x eaf-open-browser, I opened a new EAF/Brower and loaded a web site. Once the page loads, I cannot use any key chords. For example, M-x doesn't move to the minibuffer to enter a command; I can't use C-x b to switch buffers; etc. If the page has a text entry field, I can type text. None of the EAF keybindings work, either. I can use the menus to close things. If I use the menus to switch buffers, I get normal control back i.e. M-x works, etc. I've tried using a minimal config but the problem persists.

The contents of the *eaf* buffer are included below.

qt.qpa.xcb: X server does not support XInput 2
EAF process starting...
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 168, resource id: 161, major code: 130 (Unknown), minor code: 47
Session is not restored, as no data present in session file.
Session is not restored, as no data present in session file.
[33254:33805:0513/174122.496528:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out (service_start_timeout=25000ms)
[33254:33805:0513/174147.514452:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[33254:33805:0513/174212.540240:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
js: Automatic Cv management is set to "true" in config.  However, cv plugin is not available. Disabling automatic Cv management
js: Uncaught TypeError: awa.sendEventThroughIframe is not a function
js: Error: 404 from API [object Object]
js: [object Object] [object Object]
[33254:33805:0513/174437.808704:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out (service_start_timeout=25000ms)
[33254:33805:0513/174502.832443:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out (service_start_timeout=25000ms)
[33254:33805:0513/174527.835100:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.UPower': timed out (service_start_timeout=25000ms)
MatthewZMD commented 4 years ago

What's your distro and DE?

PerlStalker commented 4 years ago

I'm using i3 on Arch Linux

On Wed, May 13, 2020 at 7:21 PM Matthew Zeng notifications@github.com wrote:

What's your distro and DE?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/manateelazycat/emacs-application-framework/issues/291#issuecomment-628330092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMVLHN2Z6PUZSFCLJ5HPLRRNBRZANCNFSM4NAGVHBA .

-- Randall Smith http://www.musicfreestatic.com/ KE0NDF

manateelazycat commented 4 years ago

There have two error, one is XCB and another is DBus.

EAF works well with KDE, Gnome X11 and Gnome Wayland.

I think you need switch to above DE for test.

i3 is not support environment now.

Thanks for report.

michaelmrose commented 4 years ago

It is very odd that this functionality ought to be specific to a particular DE seems pretty fragile. In Emacs 28/manjaro/i3wm/latest eaf I actually get

qt5ct: using qt5ct plugin EAF process starting... Session is not restored, as no data present in session file.

To be clear no keyboard input of any kind works meaning you can't say hit page down to navigate the page but you also can't even close the buffer. The mouse however still works including selecting another open window or tab if any. Once you switch to another tab you can once again use all your keyboard shortcuts as normal in this non eaf buffer.

If you have no tabs open and don't have the new tab button configured to be shown the only way out of say a browsing session is to destroy the emacs window via the window manager possibly losing other data in unsaved buffers.

Interestingly if you click on another tab and then click back to the eaf browser window a good chunk of the time keyboard input starts working as normal.

Also with emacsclient and daemon mode one can still interact with the running emacs. For example. I really like the using it to read certain html mail that isn't very readable otherwise so I have a binding to load the mail in html and another to terminate the eaf browser buffer with extreme prejudice. As its above the emacs level and using emacsclient to talk to emacs its not blocked.

Edit: Behavior under Plasma is EXACTLY the same although the output is slightly different.in the EAF buffer

EAF process starting... Session is not restored, as no data present in session file. qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 5133, resource id: 67108954, major code: 4 (DestroyWindow), minor code: 0 Session is not restored, as no data present in session file.

This is not EAF being broken under i3. It's EAF being broken under recent versions of emacs under arch and derivatives.

michaelmrose commented 4 years ago

Also verified that the same error obtains when running emacs -Q adding the path to eaf to load-list requiring eaf and opening a eaf browser window to google.com so it also has nothing to do with my emacs config.

MatthewZMD commented 4 years ago

This is not EAF being broken under i3. It's EAF being broken under recent versions of emacs under arch and derivatives.

I'm on Manjaro KDE and emacs 27.0.91 everything work perfectly. I gave up using 28 two weeks ago, it is too new and buggy (it's 2 major versions ahead of the current official release!!), and they yet to add any new attractive features. 27.0.91 is very stable and has everything needed. I highly recommend sticking with 27 until 28 matures.

MatthewZMD commented 4 years ago

Interestingly if you click on another tab and then click back to the eaf browser window a good chunk of the time keyboard input starts working as normal.

It is possible that this links to #289 , more investigation will be needed

michaelmrose commented 4 years ago

I reinstalled to install the gtk version since I use the lucid version. Bug is identical on both interfaces.

MatthewZMD commented 4 years ago

Have you tried 27?

manateelazycat commented 4 years ago

All i3 issues are point to "keyboard focus", I guess there have some workaround can fix "keyboard focus" on i3.

I'm too old and I don't want waste my time to adapter window manager (Gnome3, KDE, Xfce are good enough).

Anyway, any PR are welcome.

wilderjds commented 4 years ago

I'm too old and I don't want waste my time to adapter window manager (Gnome3, KDE, Xfce are good enough)

I am facing the same issue in KDE on current git master; triggering krunner works sometimes, but other times it does not. emacs is 26.3