Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support _NET_WM_MOVERESIZE #2140

Open
yshui opened this issue Dec 12, 2017 · 10 comments · May be fixed by #3859
Open

Support _NET_WM_MOVERESIZE #2140

yshui opened this issue Dec 12, 2017 · 10 comments · May be fixed by #3859

Comments

@yshui
Copy link

yshui commented Dec 12, 2017

Output of awesome --version:

awesome v4.2 (Human after all)
• Compiled against Lua 5.2.4 (running with Lua 5.2)
• D-Bus support: ✔
• execinfo support: ✘
• xcb-randr version: 1.5
• LGI version: 0.9.2

gtk+ relies on this to detect if the WM supports move and resize. Otherwise gtk+ will use a clumsy and sometimes buggy implementation of move and resize.

@psychon
Copy link
Member

psychon commented Dec 12, 2017

What is clumsy and sometimes buggy with their implementation? From a quick check, only the maximisation handling seems to be weird (if the y position on the root window is smaller than 10, the window is maximized). I don't really see what we would do better here besides that.
Besides that, I don't really see how to implement _NET_WM_MOVERESIZE and that is already when excluding these weird keyboard modes...

Edit: And apparently i3 chose not to implement this properly either: https://sources.debian.org/src/i3-wm/4.14.1-1/src/handlers.c/?hl=922#L936

Edit: So far I looked at i3 and kwin. i3 seems to ignore most of the message and kwin is complicated code where I learnt that the difference between .._MOVE and .._MOVE_KEYBOARD is in whether you are allowed to move the window offscreen.... What?!? This standard makes no sense to me.

@yshui
Copy link
Author

yshui commented Dec 13, 2017

@psychon well it used to make firefox crash.. https://bugzilla.mozilla.org/show_bug.cgi?id=1186967

@ff2000
Copy link

ff2000 commented Feb 23, 2018

I want to ask if I see a related issue or if this is something entirely different:
Maximized firefox (or put inside a layout) can still be moved when clicking and dragging in sensible areas, e.g. on the small area between tabs and location bar. This happens quite often to me and is annoying :(

@deeedob
Copy link

deeedob commented Jan 10, 2023

Hey, are there any plans to integrate this? I would really need it!

@actionless
Copy link
Member

I would really need it!

could you please elaborate why

@deeedob
Copy link

deeedob commented Jan 18, 2023

I develop GUIs extensively, and thus it is often necessary to have these WM hints enabled. In Qt, for example, these are checked and used to trigger the movement or resizing of a window.

https://doc.qt.io/qt-6/qwindow.html#startSystemMove

@actionless
Copy link
Member

weird, i have few qt6 apps which seems to handle move/resize correctly, mb you could point to exact code branch in qt6 code where that WM hint matter?

@psychon
Copy link
Member

psychon commented Jan 19, 2023

mb you could point to exact code branch in qt6 code where that WM hint matter?

Let me GitHub-search that for me. There aren't that many hits for _NET_WM_MOVERESIZE in Qt. This seems to be the "is it supported"-check: https://github.com/qt/qtbase/blob/ec787ce14363c843f9c1149bad8045ff6acbcf1c/src/plugins/platforms/xcb/qxcbwindow.cpp#L2316-L2320
(This should be a relatively recent commit on the dev branch, so I am not exactly answering your request. Sorry!)

@actionless
Copy link
Member

actionless commented Jan 19, 2023

i was suspecting that, like in gtk, it's loading two alternative implementations depending if that hint is present - which is not the case, so we indeed seems to be needing this hint

(not sure though why move/resize still working in the apps)

@deeedob
Copy link

deeedob commented Jan 20, 2023

So, as stated in the docs. If this atom is not enabled setPosition is used which is ... somewhat suboptimal. I encountered problems where the window starts jiggling around. It is just better to have the move and resize handled by the window manager natively :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants