Logs: liberachat/#xmonad
| 2023-03-19 20:03:51 | <dge> | ok, i get a compilation error after to try from stack recompile.... due to version between ghc and stack (8.10 for ghc and 9.2.7 from stack) that is bad. I have to upgrade stack, but missing space on VM disk (crying)... |
| 2023-03-19 20:33:23 | × | dge quits (~jeromelan@221-22-190-109.dsl.ovh.fr) (Ping timeout: 246 seconds) |
| 2023-03-19 21:35:51 | → | Guest1886 joins (~Guest18@node-1w7jr9yaj7srjfo5i42ldx870.ipv6.telus.net) |
| 2023-03-19 21:43:10 | <Guest1886> | Having trouble with an app stealing keyboard focus. Reproduced this with a minimal xmonad config (i.e. just `import XMonad; main = xmonad def`). Repro: with the minimal config launch Godot4 (stable), and switch to a terminal with `modmask+j` then resize window with `modmap+h` and observe that keystrokes go to the Godot4 window even though the |
| 2023-03-19 21:43:11 | <Guest1886> | terminal's borders are highlighted. I'm running latest ArchLinux: |
| 2023-03-19 21:43:58 | <Guest1886> | libx11 1.8.4-1 |
| 2023-03-19 21:43:59 | <Guest1886> | xmonad 0.17.1-87 |
| 2023-03-19 21:43:59 | <Guest1886> | xmonad-contrib 0.17.1-86 |
| 2023-03-19 21:44:00 | lisk1n | is now known as liskin |
| 2023-03-19 21:44:23 | <geekosaur> | you're saying the xmonad keys are going to the app? |
| 2023-03-19 21:44:34 | <Guest1886> | all keys are going to the app |
| 2023-03-19 21:44:43 | <geekosaur> | that requires it to have done a key grab, which we can't prevent |
| 2023-03-19 21:44:50 | <Guest1886> | xmonad keys still work |
| 2023-03-19 21:44:54 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2023-03-19 21:45:00 | <geekosaur> | oh |
| 2023-03-19 21:45:31 | <Guest1886> | It doesn't happen in e.g. Ubuntu 22.04 (with alt-tab) |
| 2023-03-19 21:46:28 | <Guest1886> | i.e. with Ubuntu's stock window mgr and desktop |
| 2023-03-19 21:47:02 | <geekosaur> | have you tried it with xmonad on ubuntu? or with a different window manager on arch? |
| 2023-03-19 21:47:36 | <geekosaur> | we've had problems with arch's packaging of Haskell stuff (and in particular xmonad) but this would be somewhat weird |
| 2023-03-19 21:48:45 | <Guest1886> | I tried xfce and lxde on arch and saw the issue randomly on lxde (alt-tabbing) but not on xfce. I'm trying xmonad in Ubuntu next |
| 2023-03-19 21:50:54 | <Guest1886> | This is a related issue for Godot https://github.com/godotengine/godot/issues/74587 but it isn't really getting any attention leading me to think that not many people are seeing it. So I'm not sure what software has the issue. |
| 2023-03-19 21:53:02 | <Guest1886> | As above, I reproduced with min config but I noticed that the problem is much more aggressive with my full config, notably with bluetile (i.e. grabs keyboard more often and much harder/nearly impossible to get keyboard focus back even when clicking mouse on intended window) |
| 2023-03-19 21:53:11 | <geekosaur> | sounds like that's actually two issues, an earlier Windows-specific one and a more recent one that repros in lxde and i3 |
| 2023-03-19 21:53:18 | <geekosaur> | and, apparently, xmonad |
| 2023-03-19 21:53:55 | <geekosaur> | the i3 reproduction is 3 days old |
| 2023-03-19 21:54:18 | <geekosaur> | which means just before the weekend so probably nobody sees it until tomorrow 🙂 |
| 2023-03-19 21:55:17 | <Guest1886> | yes, I was thinking more of a general issue originally with the windows problem but since it didn't show up in Ubuntu (stock WM) or Arch XFCE it seems like the windows issue might be unrelated and that the i3 and xmonad issues *might* be caused by similar implementations (??) |
| 2023-03-19 21:55:56 | <geekosaur> | well, we're both tiling, but that doesn |
| 2023-03-19 21:55:59 | <geekosaur> | 't explain LXDE |
| 2023-03-19 21:56:30 | <geekosaur> | I'd be curious as to whether it also happens with LXQt (same environment different implementation) |
| 2023-03-19 21:57:12 | <Guest1886> | I'll test LXQt in Arch too |
| 2023-03-19 21:57:15 | <geekosaur> | in any case it sounds like it's stealing focus |
| 2023-03-19 21:59:09 | <Guest1886> | So I don't know much about X11 implementation but it sounds like client windows can choose to steal focus, overriding any focus controls implemented in window managers? |
| 2023-03-19 21:59:23 | <geekosaur> | (LXDE is Gtk based, LXQt is part of a long term move from Gtk to Qt) |
| 2023-03-19 21:59:30 | <geekosaur> | yes |
| 2023-03-19 21:59:42 | <geekosaur> | it's strongly frowned upon |
| 2023-03-19 21:59:51 | <Guest1886> | gotcha |
| 2023-03-19 22:00:43 | <geekosaur> | but the same API is used for a program to set focus to an internal widget so they can't simply remove it |
| 2023-03-19 22:07:45 | <Guest1886> | btw I found running `watch -n0.1 xdotool getwindowfocus getwindowname` useful for debugging this |
| 2023-03-19 22:08:50 | <Guest1886> | just prints the currently focused window and the bug can be seen when it prints the Godot window name while xmonad is highlighting a different window |
| 2023-03-19 22:09:36 | × | Guest1886 quits (~Guest18@node-1w7jr9yaj7srjfo5i42ldx870.ipv6.telus.net) (Quit: Client closed) |
| 2023-03-19 22:09:36 | × | Guest18 quits (~Guest18@node-1w7jr9yaj7srjfo5i42ldx870.ipv6.telus.net) (Quit: Client closed) |
| 2023-03-19 22:27:25 | → | Guest1886 joins (~Guest1886@node-1w7jr9yaj7srjfo5i42ldx870.ipv6.telus.net) |
| 2023-03-19 22:28:11 | <Guest1886> | LXQt on Arch behaved the same as LXDE did |
| 2023-03-19 22:30:20 | <Guest1886> | However there is a difference between what LXDE/Qt are doing and what XMonad is doing. LXDE/Qt keep correct window highlighting but XMonad doesn't |
| 2023-03-19 22:32:15 | <Guest1886> | i.e. in the video ( https://github.com/godotengine/godot/issues/74587#issuecomment-1466538062 ) at 15 seconds you can see alt-tab to terminal fails but the Godot window keeps the highlighting. But when in XMonad the terminal I wan't to type in gets highlighted but the keystrokes keep going to Godot |
| 2023-03-19 22:33:20 | <geekosaur> | hm. normally xmonad should get the focus change event and update the borders |
| 2023-03-19 22:35:23 | <Guest1886> | Yes that's what's making think that at least part of the prob is in XMonad |
| 2023-03-19 22:45:39 | <geekosaur> | https://paste.tomsmeding.com/Cx907lfH |
| 2023-03-19 22:46:21 | <geekosaur> | then check the session log when this is happening. it should show either or both of FocusChangeEvent or CrossingEvent happening |
| 2023-03-19 22:46:38 | <geekosaur> | (probably FocusChangeEvent since the mouse isn't causing it_ |
| 2023-03-19 22:46:41 | <geekosaur> | ) |
| 2023-03-19 22:48:02 | <Guest1886> | Will do |
| 2023-03-19 22:48:43 | <Guest1886> | Also just confirmed bug occurs in Ubuntu 22.04.2 |
| 2023-03-19 22:49:07 | <Guest1886> | xmonad 0.15 |
| 2023-03-19 22:49:11 | <Guest1886> | totally default |
| 2023-03-19 22:51:25 | <geekosaur> | the other alternative is you'll see a whole bunch of them, which would mean xmonad is indeed trying to track it but it's fighting with godot4 and you can't see the focus changes because they're happening too quickly |
| 2023-03-19 22:52:04 | <geekosaur> | although in that case this might slow things down just enough to make them visible |
| 2023-03-19 22:57:03 | <geekosaur> | one other thing to try is to enable EwmhDesktops and see if it still happens. for backward compatibility reasons we don't support EWMH by default, only ICCCM |
| 2023-03-19 22:57:17 | <Guest1886> | xmonad.hs:6:30: error: |
| 2023-03-19 22:57:18 | <Guest1886> | • Data constructor not in scope: |
| 2023-03-19 22:57:18 | <Guest1886> | All :: Bool -> base-4.15.1.0:Data.Semigroup.Internal.All |
| 2023-03-19 22:57:19 | <Guest1886> | • Perhaps you meant variable ‘all’ (imported from Prelude) |
| 2023-03-19 22:57:19 | <Guest1886> | | |
| 2023-03-19 22:57:20 | <Guest1886> | 6 | debugFocusEvents _ = return (All True) |
| 2023-03-19 22:57:20 | <Guest1886> | | ^^^ |
| 2023-03-19 22:57:21 | <Guest1886> | Please check the file for errors. |
| 2023-03-19 22:57:31 | <Guest1886> | Tried `import Data.Semigroup.Internal` also |
| 2023-03-19 22:57:38 | <geekosaur> | but this breaks a number of modern programs (for example, LibreOffice will get into a focus loop without EWMH) |
| 2023-03-19 22:57:48 | <geekosaur> | oh, sorry, need to import Data.Monoid, forgot that |
| 2023-03-19 22:58:00 | <Guest1886> | yeah I normally use EWMH and still saw the bug |
| 2023-03-19 22:58:15 | <geekosaur> | https://paste.tomsmeding.com/cmdAN7aB |
| 2023-03-19 23:00:37 | <geekosaur> | (…Data.Semigroup.Internal? It doesn't make any sense as a semigroup, it needs `mempty`) |
| 2023-03-19 23:01:00 | <geekosaur> | guess they have weird organization for those modules |
| 2023-03-19 23:07:54 | <Guest1886> | Which log should I look at? ~/.local/share/xorg/Xorg.0.log and /var/log/Xorg.0.log don't seem to have anything |
| 2023-03-19 23:08:36 | <Guest1886> | I don't see anything under .xmonad/ |
| 2023-03-19 23:08:52 | <geekosaur> | session log |
| 2023-03-19 23:09:03 | <geekosaur> | for startx it'll be the text console |
| 2023-03-19 23:09:17 | <geekosaur> | for display managers other than sddm it's ~/.xsession (usually) |
| 2023-03-19 23:10:06 | <geekosaur> | for sddm it's ~/.local/share/sddm/xorg-session.log |
| 2023-03-19 23:10:30 | <geekosaur> | sorry that was ~/.xsession-errors |
| 2023-03-19 23:11:15 | <geekosaur> | for display managers other than sddm that is |
| 2023-03-19 23:11:48 | <Guest1886> | ok I use startx... trying to find the magic ctrl-alt-f# key... |
| 2023-03-19 23:12:04 | <geekosaur> | should be ctrl-alt-f1 |
| 2023-03-19 23:12:47 | <Guest1886> | yeah I expected that but only >1 are working (new logins only) |
| 2023-03-19 23:13:03 | <geekosaur> | although for some reason I've never understood that doesn't work on ubuntu, I always have to ctrl-alt-f2 and then alt-f1 |
| 2023-03-19 23:15:22 | × | Guest1886 quits (~Guest1886@node-1w7jr9yaj7srjfo5i42ldx870.ipv6.telus.net) (Quit: Client closed) |
| 2023-03-19 23:15:30 | <geekosaur> | oops? |
| 2023-03-19 23:27:52 | → | Guest1886 joins (~Guest1886@node-1w7jr9yaj7srjfo5i42ldx870.ipv6.telus.net) |
| 2023-03-19 23:31:44 | <Guest1886> | https://pastebin.com/GFm11sne |
| 2023-03-19 23:31:48 | <geekosaur> | did you survive? |
| 2023-03-19 23:34:12 | <geekosaur> | odd, looks like you killed it with ^C? |
| 2023-03-19 23:34:26 | <geekosaur> | no focus changes logged, at least |
| 2023-03-19 23:34:57 | <Guest1886> | yeah... startx wouldn't work while `script` was running so I just did `startx &> log` |
| 2023-03-19 23:34:58 | <geekosaur> | so whatever godot is doing, xmonad isn't being informed of it by the server 😞 |
| 2023-03-19 23:38:39 | <Guest1886> | Also, I had to start xmonad/startx with my usual config then reload to your debug config in-session. When I started with the debug config I had no input at all and had to `killall xorg` from another console. |
| 2023-03-19 23:39:16 | <Guest1886> | I didn't see any obvious xmonad debug output in my pastebin, just the usual reload stuff |
| 2023-03-19 23:39:43 | <geekosaur> | it should only have been logging focus change related events |
| 2023-03-19 23:40:07 | <geekosaur> | I could have had you run debugEventsHook unconditionally but that would produce a lot of spam |
| 2023-03-19 23:40:34 | <geekosaur> | that thing about the debug config sounds very wrong |
All times are in UTC.