You are not logged in.
I'm trying to create a panel-like application using python, gtk4 and xlib. After last gnome-shell update this code doesn't work anymore:
# Get xid
xid = GdkX11.X11Surface.get_xid(self.get_surface())
# Get display
display = Xlib.display.Display()
# Get window
window = display.create_resource_object('window', xid)
# Move window to position
window.configure(x=0, y=0) # This doesn't work anymore !!!
# Add 'dock' property
window.change_property(display.intern_atom('_NET_WM_WINDOW_TYPE'), display.intern_atom('ATOM'), 32, [display.intern_atom('_NET_WM_WINDOW_TYPE_DOCK')], X.PropModeReplace)
# Reserve space for panel
window.change_property(display.intern_atom('_NET_WM_STRUT_PARTIAL'), display.intern_atom('CARDINAL'), 32, [0, 0, height, 0, 0, 0, 0, 0, 0, width, 0, 0], X.PropModeReplace)
# Sync changes
display.sync()wmctrl doesn't work either.
Last edited by mrvladus (2022-06-04 15:44:06)
Offline
wmctrl doesn't work either
Are you perhaps running gnome on wayland?
Can xdotool move the window around?
gnome-shell (mutter) might simply ignore config requests what would be either a bug or a new low in gnome telling you how to use your system…
Offline
wmctrl and xdotool can't properly move window in x-direction. It's hanging in around 50px from the screen left edge, like something broken in the coordinates. Launching custom session with mutter, my panel app and without gnome-shell works fine.
Offline
Can you clarify the symptoms (which may require some testing): is it just that moves to within 50px of the left edge fail? Do all moves outside of that range work?
If so, it sounds like there is a margin / strutt set by the WM. Does gnome still use the left edge for it's dock / panel / whatever-that's-called?
Last edited by Trilby (2022-06-04 15:31:54)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I just found the problem! I was using libadwaita to create and style windows and panel. I rewrote whole thing just using gtk4 and problem is gone. It's strange... I guess no libadwaita then.
Offline
Chek the props of your panel and see whether adwaita blesses it w/ some CSD margin/shadows
Offline