xprompt: a dmenu rip-off with contextual completion - Programming On Unix
Users browsing this thread: 1 Guest(s)
|
|||
(16-08-2020, 03:54 AM)vain Wrote: I’m having a few focus issues This is really nasty. xprompt (and dmenu, for that matter) try to throw the WM off its throne. They use override_redirect to try to avoid any interference by the WM in the first place. Then, they grab focus. Not once, but repeatedly until they get it. My WM on the other hand wants to enforce a certain focus policy: Only that one window, which is currently selected by the WM, shall have focus. This conflicts with xprompt’s/dmenu’s intention (because the WM can never select xprompt/dmenu due to override_redirect). On top of that, I hadn’t even considered that override_redirect clients might steal focus, probably because focus handling is confusing enough with regular clients. All this leads to chaos. Funny that it took several years for me to notice this. (Honestly, override_redirect is a bad flag, isn’t it? Why have a WM that is supposed to manage all windows, when clients can decide to opt out of this and do all kinds of funny stuff?) Sorry for the ramblings. This has little to do with xprompt. – edit: dmenu is fine on their current git master. Commit db6093f says input focus issues have been fixed. dmenu now only grabs focus when running embedded. You already said that on IRC. I dismissed it because it confuses XTerm a little bit (showing solid cursor instead of a hollow one while xprompt/dmenu is running). Other than that, I haven’t found any issues. From a pragmatic point of view, it’s probably best to not change focus unless you really have to. That is, do what dmenu does and only touch focus when running embedded. (I might be biased here, because that approach means I can use xprompt without having to add more workarounds to my WM. :)) |
|||