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

Desktop Geometry/WorkArea Issue #18

Open
ncvescera opened this issue Dec 18, 2021 · 0 comments
Open

Desktop Geometry/WorkArea Issue #18

ncvescera opened this issue Dec 18, 2021 · 0 comments

Comments

@ncvescera
Copy link

I have some problems with DesktoGeometry and WorkArea values: I am trying to get the active window and resize it to fill the entire screen but when I use the function setMoveResizeWindow with the WorkArea values it put the window in a different position.

This is my code:

from ewmh import EWMH

ewmh = EWMH()

# get desktop geometry and workarea
w, h = ewmh.getDesktopGeometry()
xr, yr, wr, hr = ewmh.getWorkArea()[:4]

print("Desktop Geometry: ", w, h)
print("Desktop WorkArea:", xr, yr, wr, hr)

# get active window
win = ewmh.getActiveWindow()

# resize window
ewmh.setMoveResizeWindow(
    win,
    x=xr,
    y=yr,
    w=wr,
    h=hr
)

ewmh.display.flush()

I've tested this script on my ArchLinux + XFCE system and on a Ubuntu 20.4 WM, same problem but in different ways:

arch
On Arch the window height is bigger than screen height.

ubunut_wm
On Ubunut the window is in a weird position.

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

1 participant