Open motorlatitude opened 4 years ago
P.S. I'm not sure whether this is an issue with Awesome or Electron in this case.
please try with Openbox, from my experience it's the least buggy (but still modern) WM in the world, so i always use it for double-checking any window-management-related quirks with the apps
So I quickly spun up an OpenBox VM and I used VSCode as a test and it was possible to drag the window using the custom title bar. Also quickly tried on my own electron app which also uses custom draggable regions and it also worked flawlessly on OpenBox.
tried on my own electron app
if you can upload here the minimal reproductive example that would be useful
Random guess: Missing _NET_WM_MOVERESIZE
support: https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm45805408003200
And I have no idea how to "send" such a request through Lua.
(Also, the spec mentioning that it is broken and that there is a possible race condition inspires lots of trust...)
And I have no idea how to "send" such a request through Lua.
That would be using request::geometry
with a moveresize
context and an hint table with x
,y
,width
,height
. If you can make a skeleton patch for the xcb side, then I can take care of the plumbing. Or would this be possible to implement it using the xproperty Lua API? I didn't test.
I went ahead and made a very simple electron app with draggable regions if needed for testing etc. Works in OpenBox.
@Elv13 Be sure to read the relevant part of EWMH: https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm46035372584864
For testing: As soon as the WM announces support for _NET_WM_MOVERESIZE
, GTK uses that. I "tested" the following patch with Gvim. When clicking and dragging in the toolbar (outside of any icons), it initiates a move. Dunno how to initiate a resize. (It also aborts the move when the button is released while still inside of that window, so perhaps that part can be tested via this.)
Also, since OpenBox was mentioned above: The relevant code seems to be: https://github.com/danakj/openbox/blob/9e8813e111cbe6c1088f6abbc771a29470f05fc2/openbox/event.c#L1476-L1511 and https://github.com/danakj/openbox/blob/9e8813e111cbe6c1088f6abbc771a29470f05fc2/openbox/moveresize.c#L177 "resize via keyboard" seems to be handled as "southeast" and "move via keyboard" just the same as "move".
Output of
awesome --version
:Issue:
Certain electron apps will use custom title bars over native ones, or the custom title bars fit more with the applications theming. Custom title bars use the
-webkit-app-region: drag;
CSS attribute to create draggable regions within the window. It is not currently possible to drag a window by using these draggable regions. They don't get recognised and as such these windows either have to use native title bars or resort to using the super + mouse drag combination.Actual result:
The window can only be dragged using the super + mouse drag combination, not by the title bar, which is not ideal in floating mode. I personally like the custom title bar offered by VSCode but cannot move the window through it.
Expected result:
To drag a window by a native or custom title bar.
P.S. I'm not sure whether this is an issue with Awesome or Electron in this case.