JavaProgrammer
Posts: 2
Joined: Fri Mar 06, 2015 11:37 pm

Move windows in XWindows through code

Thu Oct 20, 2016 2:41 pm

Hello all, I hope this is the right section if not someone please direct me to the correct on. That being said ill get straight to it, is there a way to move and resize windows within Raspian Xwindows desktop through code? Preferably Python or Java. What I mean is not a program moving and resizing itself, but a program that can move and resize other running program's desktop windows.

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Move windows in XWindows through code

Thu Oct 20, 2016 3:04 pm

The actions you are looking for is usually handled by the Window Manager in X-windows.
Somehing you can look at is the commandline tool "xdotool". ( http://www.semicomplete.com/projects/xdotool/ )
You should be able to execute it by using the system() call in Java or Python.

Edit:
Seems like someone made a Python wrapper for "libxdo": https://github.com/rshk/python-libxdo

Return to “Graphics programming”