简体   繁体   中英

Python+gtk fullscreen window cover (or toggle) another fullscreen application

Anyway to make a python GTK window cover or remove from fullscreen another window that is already on fullscreen mode?

My scenario is that I have a app in fullscreen mode (firefox) and when I call window.fullscreen() the window dont cover the firefox window, and remains in second plane.

Using gtk.gdk.Window.set_keep_above will tell the window manager to raise your window above other windows and keep it on top, unless other windows also have keep-above set. Some users won't like that behavior because it can make it difficult to get to or raise other windows. An alternative is to send messages to the window manager telling it to raise your window. I think

import os
...
os.system('wmctrl -a mygtkwindow')

will tell the window manager to raise the window whose title contains "mygtkwindow", and give it focus.

Some programs related to window manager control: dcop [1] , [2] , devilspie , wmctrl [1] , [2] ,[3] , and xautomation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM