3

I have very simple script to move a currently active window

from gi.repository import GdkX11,Gdk,Gtk

screen = GdkX11.X11Screen.get_default()

# use width and height on this one
#work_area = screen.get_monitor_workarea(0)
#active_window_xid = int(screen.get_active_window().get_xid())

aw = screen.get_active_window()
aw.move(0,250)

Problem is that it doesn't work , unless I add screen.get_active_window() again after the last line. Is there any reason for this and how can I make changes take effect immediately ?

Sergiy Kolodyazhnyy
  • 938
  • 1
  • 13
  • 41

0 Answers0