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

Impossible to submerge windows #480

Open
Jopp-gh opened this issue Dec 17, 2024 · 6 comments
Open

Impossible to submerge windows #480

Jopp-gh opened this issue Dec 17, 2024 · 6 comments

Comments

@Jopp-gh
Copy link

Jopp-gh commented Dec 17, 2024

I'm trying to move a window at the very bottom of my screen, to keep only the toolbars visible and submerge the rest of the window.

xdotool moves windows till the window footer touches the bottom of the screen and not an inch over this limit.

Here's a simple test:
Code: Select all

xdotool getactivewindow windowmove 100 1000
@FascinatedBox
Copy link

Probably your window manager trying to keep you from burying a window where you'll have a hard time pulling it back. Of course, with xdotool automation, you've got a way, but most users don't.

Are you sure you're not meaning to either unmap the window? What about (if you're building from source and have windowstate), marking the window as hidden?

If your window manager supports motif wm hints, you could flag the window as being borderless before burying it, then unflag it before unburying it.

@Jopp-gh
Copy link
Author

Jopp-gh commented Dec 24, 2024

Ops, I'm using Linux Mint and my WM should be muffin/metacity.

where you'll have a hard time pulling it back

This kind of window tiling works only at the bottom, because with the toolbar visible you only need to click the fullscreen button to restore the window.

If your window manager supports motif wm hints

Something like this?

xprop -id 0x02c00002  -f _MOTIF_WM_HINTS 32c \
          -set _MOTIF_WM_HINTS '0x2, 0x0, 0x0, 0x0, 0x0'

@FascinatedBox
Copy link

| Something like this?

I'll be darned, I thought that was going to work. My bad. I did some digging and realized what's going on: xprop is setting the right field to the right values, but it's setting the wrong type (array of cardinal).

The result is this: _MOTIF_WM_HINTS(CARDINAL) = 2, 0, 0, 0, 0

It should be this: _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0

It looks like xprop doesn't have a way of letting you specify the correct type, so that avenue is a bust...unless your window manager allows it to be of cardinal type.

@Jopp-gh
Copy link
Author

Jopp-gh commented Jan 5, 2025

Haha, don't worry.

Window manipulation shouldn't be that difficult, so your feedback is more than welcome.

Usually bash scripting isn't too hard for me, but this specific issue seems to be surprisingly out of the norm.

On the contrary, I'm sorry if I've put any xprop code without much testing: I didn't have enough time to grasp it myself and my motivation to experiment with obscure commands is pretty low right now.

@jordansissel
Copy link
Owner

You might have better luck using EWMH hints instead of Motif hints. That said, you might be able to set the window's Override Redirect attribute which can tell the windowmanager to stop managing it - this has several effects, but the most visual is that the window manager stops drawing the window border (titlebar, etc) for the window.

I couldn't find a tool that let you change this attribute, so I made a quick patch to xdotool that allows this:

#482

Building this, then try something like xdotool selectwindow window_override_redirect 1 and click on a window to set Override Redirect to 1. You can revert this by setting the value to 0 instead of 1. My idea is that you could set override redirect to 1, then move the window however you want. When you want to restore the window, move it back and set override redirect back to 0.

Assuming building xdotool is something you are comfortable with, I'd love to know if this helps.

@Jopp-gh
Copy link
Author

Jopp-gh commented Jan 11, 2025

Nice, this comes unexpected, so all I can say is ... Awesome!

I take notice and will do some tests these days and let you know how it worked out for me.
Thanks to both of you, Fascinatedbox and Jordansissel.

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

No branches or pull requests

3 participants