Comments (5)
There's no real need to add this to the tracker, as this can be accomplished in literally one line using AutoHotkey:
; A hotkey of Windows Key + x
#x::
; Set the currently active window to "AlwaysOnTop" mode, or disable it if it was already set that way
Winset, AlwaysOnTop, Toggle, A
; Play a sound so that I know the hotkey was pressed
SoundPlay, C:\Windows\Media\Windows Logoff Sound.wav
return
from rebirthitemtracker.
This lists how to add this option:
http://stackoverflow.com/questions/1482565/how-to-make-python-window-run-as-always-on-top
It seems it would only take adding 2 additional lines? Something like:
if option.alwaysontop:
SetWindowPos(pygame.display.get_wm_info()['window'], -1, x, y, 0, 0, 0x0001)
from rebirthitemtracker.
when i call that function, it can successfully set the size and position, but it doesn't do the always-on-top
from rebirthitemtracker.
I forgot to post it there, when looking for a platform independent solution I found this :
http://pygame.org/project-Window+Manager+Extensions-515-.html
If using a pygame extension is fine I could take a look at this in like 2 weeks.
from rebirthitemtracker.
I forgot to say that I looked into it.
tl;dr: Zam's lines "should" have worked, and please make this a Windows-specific option.
Long version :
Windows
The extension is pretty straightforward, basically it does what Zam said :
SetWindowPos(getSDLWindow(), zorder, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE)
Which translates to :
from ctypes import windll
windll.user32.SetWindowPos(pygame.display.get_wm_info()['window'], -1, 0, 0, 0, 0, 0x0003)
(the SWP_NOMOVE
flag tells no to modify the window position, so x/y would be ignored)
So if Hyphen tested it and it didn't work then idk...
Both the extension and the SO question are quite old, pygame and/or windows may have changed stuff in between. I can't be very helpful with this.
Linux
It's... complicated.
First of all there is not only one window manager.
The program can set a bunch of predefined "hints" that may, or may not, be handled by the window manager (in this case the _NET_WM_STATE_ABOVE
, from the Extended Window Manager Hints).
I use a tiling window manager, floating windows support is here only for edge cases like "print" or "save as" popups, or specific app like inkscape/gimp (and in my case Isaac windowed+tracker+timer, which do not overlap). In the context of such a WM, there is not much use-case for a z-order on floating windows, and i3 just doesn't support it.
Still, I could extract a minimal set of changes from the extension and run it. It obviously doesn't work for me, but the most popular desktop environments (gnome/kde) have support for this, so I believe it would work.
However I actually don't have a use for this feature, and I'm not setting up a VM to test this :p
If someone else want to bring the linux support for this feature, I can push a rough draft of the changes needed somewhere. Maybe @Nandicre would be interested to do this, he mentioned he was using arch and I think he uses xfce, which claims having support for EWMH.
Not sure it's worth it though.
from rebirthitemtracker.
Related Issues (20)
- Getting the twitchclientid from the default server leads to 404. HOT 2
- Adds English (US) keyboard to windows. HOT 5
- Old Bandage icon wrong displaying HOT 2
- Since 1.2.3 the ItemTracker don't run with Afterbrith HOT 4
- Put run logs back in and fix their crappy file names HOT 2
- "Best friend" dupes itself in the log on use
- Hangs on start with black window HOT 25
- Make the tracker persist run info through Isaac relaunches HOT 3
- 2.0.3 Opens then closes HOT 3
- "Unable to read font filename" HOT 9
- High DPI monitor compatibility HOT 7
- High cpu usage
- Rotation Option and Transparent Option?
- cx_Freeze: Python error in main script HOT 3
- Item Tracker not working on 2 pc build HOT 1
- Items and floors are forgotten when exiting and continuing HOT 3
- crash by right clicking ItemTracker (to reach option menu) on linux
- Strange error if launching from '.bat' file HOT 4
- how to make a transparent background HOT 2
- Have ItemTracker stay open when tabbing out HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rebirthitemtracker.