Open blueyed opened 9 years ago
btw: c.focusable is True for both windows, despite the "Client accepts input or input focus: False" for the dialog. But that may be something different then?!
Yeah, for c.focusable
to be true
, it is enough to either have the "accepts focus" hint or to implement the WM_TAKE_FOCUS
protocol.
HeidiSQL seems to use the globally active input focus model and awesome only supports that partly. No idea why it does this (the 1x1 window seems quite useless), but let's look closely at what I guess happens:
client.focus
to the 1x1 window.accepts input focus
is false), but sets the focus to the root window.WM_TAKE_FOCUS
protocol, awesome also sends a WM_TAKE_FOCUS
message to the window.client.focus
to point at the window which now has the focus.This window is the window that we started with and thus trying to move the focus away failed.
I don't see what we can do to handle this besides ugly hacks. And especially in this case, I don't have much motivation for working around this, because the 1x1 window seems like a really, really bad hack on their end.
I agree that this is a bad corner case, but I think we can improve awesome to handle it.
This window is the window that we started with and thus trying to move the focus away failed.
I think awesome could handle the case where the focus from the root window got taken by the same window, and skip it for focus selection, by focusing the next client in the mod-j list.
I would say that it currently cannot be implemented on the Lua level, and maybe shouldn't, because it's the deal of the WM_TAKE_FOKUS handler, I suppose?
I don't have much motivation for working around this
It's a little detail, yes, but can be maybe fixed with a few lines of code, and would make awesome more robust to this behavior in general.
[This was originally reported in the old bugtracker (FS#1284).]
This requires you to use combinations of mod+j and mod+k to move away or select the client window.
The relevant properties of the dialog ("Session manager") are:
And the main window:
So the actual window ("Session manager") has skip_taskbar and the main window has a size of 1x1.
This works, because transient windows are stacked above their parents.
btw: c.focusable is True for both windows, despite the "Client accepts input or input focus: False" for the dialog. But that may be something different then?!
There are two issues here:
Re 2: when the main window is focused, it appears to send an event to focus the "dialog". The following is the output from some added print/printf statements:
I am not sure about how this should get handled.
client.focus.byidx
is not able to check if the focus was changed back, because this happens later (afterclient_focus_refresh
).Reported for HeidiSQL at: https://sourceforge.net/p/heidisql/tickets/3688/