The JWM keyboard shortcuts don't work sometimes

Moderators: 666philb, Forum moderators

Post Reply
Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

The JWM keyboard shortcuts don't work sometimes

Post by Burunduk »

No-one has noticed this bug so far. Maybe only my Fossapup has it, but maybe not. I wrote about it in this post.

On Fossapup64-9.5, JWM 2.4.0 and 2.4.3:
when all the windows on the active desktop are minimized (not with the "show desktop" button), the JWM keyboard shortcuts stop working.
(Vanilla dpup 9.3 is not affected probably because it uses Xwayland.)

JWM sets the input focus to None while it should set it to the root window. According to the Xlib manual,

If focus is None, all keyboard events are discarded until a new focus window is set…

Workaround: I've made a patch for JWM 2.4.3 that seems to work. It's just a snippet copied to clientlist.c from main.c where it's used for initialization. I don't know how to do it better.

Thanks to @Eastler_Dart for helping to reproduce the bug.

Edit: It's related to conky, see viewtopic.php?p=87851#p87851 below.

Attachments
clientlist.patch.txt
for JWM 2.4.3
(628 Bytes) Downloaded 18 times
Last edited by Burunduk on Sat Apr 29, 2023 9:47 am, edited 1 time in total.
dimkr
Posts: 1998
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 38 times
Been thanked: 911 times

Re: The JWM keyboard shortcuts don't work sometimes

Post by dimkr »

Burunduk wrote: Fri Mar 24, 2023 4:44 pm

(Vanilla dpup 9.3 is not affected probably because it uses Xwayland.)

It doesn't. 9.3.x uses X.Org.

Fossapup misses years of bug fixes at this point and I wouldn't be surprised if this is yet another bug fixed after 2020.

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: The JWM keyboard shortcuts don't work sometimes

Post by Burunduk »

I've compiled the newer JWM 2.4.3 on Fossapup. It has the same problem, so I've made a patch for it. Maybe the X version used in dpup can handle the focus is None situation more gracefully.

User avatar
MochiMoppel
Posts: 1132
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 367 times

Re: The JWM keyboard shortcuts don't work sometimes

Post by MochiMoppel »

Burunduk wrote: Fri Mar 24, 2023 4:44 pm

No-one has noticed this bug so far. Maybe only my Fossapup has it, but maybe not. I wrote about it in this post.

On Fossapup64-9.5, JWM 2.4.0 and 2.4.3:
when all the windows on the active desktop are minimized (not with the "show desktop" button), the JWM keyboard shortcuts stop working.

I can't reproduce the bug :( . Never noticed in F96_CE, JWM 2.4.3
I'm now in Fossapup64-9.5, JWM 2.4.0 . All keyboard shortcuts seem to work normally when all windows are minimized, for example Alt+F1 always displays main menu. Also shortcuts directly related to windows (I added <Key mask="A" key="m">maximize</Key>) work as expected, provided window tabs in the taskbar have focus and are active, i.e. they will not work when you minimize, switch desktop and activate another window and then switch back. Is this the scenario you mean?

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: The JWM keyboard shortcuts don't work sometimes

Post by Burunduk »

MochiMoppel wrote: Sat Apr 29, 2023 1:20 am

I'm now in Fossapup64-9.5, JWM 2.4.0 . All keyboard shortcuts seem to work normally when all windows are minimized, for example Alt+F1 always displays main menu.

This bug doesn't seem to be hardware related and should be easy to reproduce. I have a patched version of JWM 2.4.3 so I've rebooted my Fossapup64-9.5 without the save file (RAM only) and here are the steps:

  • In RAM-only mode the "Quick Setup" window should appear. At this moment the shortcuts work: Alt-F1 opens the main menu.

  • Close "Quick Setup" window. The "Welcome" window opens. Close it as well.

  • Open urxvt or geany or any other program's window. Click the minimize _ button in the window title. Don't use the "show desktop" button to minimize that window - in the "show desktop" mode all windows are minimized but the shortcuts work as usual.

  • Now there is only one window on the current desktop and it is minimized - all the keyboard shortcuts stop working: Alt-F1 does nothing.

But you've said you cannot reproduce it on Fossapup64-9.5. Why? I've rebooted once again and minimized the "Quick Setup" window - the shortcuts work. The only difference between minimizing "Quick Setup" and minimizing urxvt afterwards is conky. So, yes it's related to conky. Thank you for helping to figure this out.
I know you hate conky, don't you? You've mentioned somewhere that you've disabled that program and hence you don't see the bug. Also dpup comes without conky.

Maybe the problem occurs because JWM tries to give focus to the conky window and fails.

User avatar
MochiMoppel
Posts: 1132
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 367 times

Re: The JWM keyboard shortcuts don't work sometimes

Post by MochiMoppel »

Burunduk wrote: Sat Apr 29, 2023 9:41 am

Maybe the problem occurs because JWM tries to give focus to the conky window and fails.

Something like that. Everything seems to work normally again when I remove the "undecorated" property from the conkyrc file:
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

In F96_CE, JWM 2.4.3 everything seems to work OOTB,

BTW You are right that I'm no fan of conky (and picom) and therefore not familiar with the peculiarities of these apps. I never use them.

[Edit] Since F96_CE, JWM 2.4.3 is OK I "borrowed" the JWM 2.4.0 from Fossa 9.5. No issues. I then also copied conky. Again no issues. I even happen to run the same kernel as Fossa 9.5 as I have issues with the 6x series. So what else is left to blame? I leave this to you to figure out :lol:

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: The JWM keyboard shortcuts don't work sometimes

Post by Burunduk »

MochiMoppel wrote: Sat Apr 29, 2023 12:09 pm

Since F96_CE, JWM 2.4.3 is OK I "borrowed" the JWM 2.4.0 from Fossa 9.5. No issues. I then also copied conky. Again no issues. I even happen to run the same kernel as Fossa 9.5 as I have issues with the 6x series. So what else is left to blame? I leave this to you to figure out :lol:

This is between JWM and X server. Maybe updated X or its settings. I don't feel like I need to do something more about this. The patched version works for me. It would be nice to fix it without patching and recompiling but it's OK as it is, especially when only this puppy version is affected.

(The "undecorated" option should stay - conky starts in a normal window without it.)

Post Reply

Return to “Fossapup64”