简体   繁体   English

PyGTK窗口始终位于所有“始终位于顶部”窗口中

[英]PyGTK Window always on top of all 'always on top` windows

I created a PyGTK application which needs to be always on top. 我创建了一个PyGTK应用程序,该应用程序必须始终放在最前面。 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. 除非您使用libreoffice全屏演示文稿之类的方法,否则此方法效果很好。 The presentation window is marked as always on top as well and hence my window goes into the background. 演示窗口也被标记为always on top ,因此我的窗口进入了后台。 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. 即使我使用Alt+Tab将其放在最前面,然后单击下面的libreoffice幻灯片(必要),我的窗口也会再次进入后台。

This is a really specific question and the solution should work on both Linux and Windows. 这是一个非常具体的问题,该解决方案在Linux和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. 我只是发现了很多关于如何always在顶部放置窗户的问题,但是没有一个问题可以解决我的问题。

Long story short: How can I put my window always on top of every window that is always on top as well? 长话短说:如何将窗口始终置于每个始终位于顶部的窗口之上?

Simple Answer: You can use 'Always on Top' in windows with by using AutoHotKey scripts. 简单的答案:您可以通过使用AutoHotKey脚本在Windows中使用“始终位于顶部”。

Follow these steps : 请按照下列步骤操作

  • Install AutoHotKey 安装AutoHotKey
  • Create a new AHK scripts following the images 在图像之后创建一个新的AHK脚本
  • Add this code ^SPACE:: Winset, Alwaysontop, , A 添加此代码^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. 您会知道它正在运行,因为绿色的“ H”徽标出现在系统托盘中,让您知道它正在作为后台进程运行。
  • Now press Ctrl+Space to set any currently active window to be always on top. 现在,按Ctrl + Space可以将任何当前活动窗口设置为始终位于顶部。 Press Ctrl+Space again set the window to no longer be always on top. 再次按Ctrl + Space可以将窗口设置为不再始终位于顶部。

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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