Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyGTK Window always on top of all 'always on top` windows

I created a PyGTK application which needs to be always on top. The transparent window redirects mouse clicks to the window below and therefore gets out of focus once you click into an underlaying window. This is the intended behaviour. In fact it should just show a little image that's always above everything.

This works well unless you use something like the libreoffice fullscreen presentation. The presentation window is marked as always on top as well and hence my window goes into the background. Even if I take it to front using Alt+Tab and then click onto the underlaying libreoffice slide (which is neccessary) my window goes into the background again.

This is a really specific question and the solution should work on both Linux and Windows. I have no idea what I should do. I just found many questions on how to have a windows always on top but none of them covering my problem.

Long story short: How can I put my window always on top of every window that is always on top as well?

like image 438
fameman Avatar asked Dec 10 '17 18:12

fameman


People also ask

How to keep popup window always on top?

To make the active window always on top, press Ctrl + Spacebar (or the keyboard shortcut you assigned).

How do you keep a window on top in Python?

Build A Paint Program With TKinter and Python In other words, tkinter displays the program window behind other programs. In order to put the tkinter window on top of others, we are required to use attributes('- topmost',True) property. It pulls up the window on the upside.


1 Answers

Simple Answer: You can use 'Always on Top' in windows with by using AutoHotKey scripts.

Follow these steps:

  • Install AutoHotKey
  • Create a new AHK scripts following the images
  • Add this code ^SPACE:: Winset, Alwaysontop, , A
  • Next, double-click your script to run it. You’ll know it’s running because a green “H” logo appears in your system tray to let you know it’s running as a background process.
  • Now press Ctrl+Space to set any currently active window to be always on top. Press Ctrl+Space again set the window to no longer be always on top.

enter image description here

enter image description here

enter image description here

like image 57
Faysal Hasan Avatar answered Sep 17 '22 20:09

Faysal Hasan