Comments (5)
For me it generally seems to work on wayland (KDE Plasma 6 in this case) but the position is off, which might be due to my displays using different resolutions and I don't understand how i can make the overlay window smaller and move it to sa specific location, which would be my usecase to use it as a DPS meter overlay for the game...
Same problem for me on two monitors with the same resolution, so that is not the problem, also happens with 024bfb6 applied
from hudkit.
It "should" work in theory, but I haven't gotten it to work in my rudimentary tests. (I don't use Wayland day-to-day.)
All of the windowing operations in hudkit use GTK3 currently, which has a Wayland backend in addition to X11, and doesn't document having any relevant platform limitations. But it seems there are many undocumented limitations, because running hudkit in weston-x11
(Wayland within X11), doesn't work: no visual, but mysteriously no errors either. I haven't debugged it further than that, because there is no obvious starting point and I don't know enough about Wayland to guess.
Perhaps the limitation is in weston, and a proper full Wayland desktop would work? I haven't tested one. If you want to test it, you should be able to run the example as per the readme, without changes. If it doesn't work, try export GDK_BACKEND=wayland
first, to make extra sure the Wayland backend is used.
Technical notes from reading around:
It seems the idiomatic way to make an overlay window on Wayland, as used by https://github.com/francma/wob, is an unstable Wayland protocol feature "wlr-layer-shell-unstable-v1". I don't know if there are alternatives, or what GTK3/GTK4 use to implement e.g. gdk_window_set_override_redirect
or gtk_window_set_keep_above
.
I would really rather rely on GTK than add platform-specific code paths. If GTK says it has a Wayland backend, but can't actually do the same thing on Wayland as on X11, that's a GTK limitation that should be fixed in GTK.
Currently-unstable webkitgtk-6.0
might have better Wayland support through GTK4. Migrating to that would take some effort and it also means migrating from GTK3 to GTK4. We can't migrate to GTK4 separately; each WebKit version depends on a specific GTK version.
I would like to stick to the stable WebKit API for ease of maintenance; the previous unstable webkitgtk-5.x
never became stable for example, and many distros don't package it anymore. I would be open to starting a migration effort on a separate branch though, since the GTK4 API is stable even if the corresponding WebKit isn't yet, and I'd expect most of the migration to be GTK changes rather than WebKit.
from hudkit.
I can test w/ a few representative examples of Wayland envs: KDE Plasma & Sway (wlroots-based compositor). Enough to see what might be needed, or might not be needed (hopefully).
Gimme a little and I'll set it up.
from hudkit.
For me it generally seems to work on wayland (KDE Plasma 6 in this case) but the position is off, which might be due to my displays using different resolutions and I don't understand how i can make the overlay window smaller and move it to sa specific location, which would be my usecase to use it as a DPS meter overlay for the game...
from hudkit.
@cptn-cosmo Thanks for testing this. I am pleasantly surprised that it works even that well. I want to fix that bug and support your use-case.
The detected monitor coordinates shown in the top-left debug information look correct to me, so the fault must be with how the overlay is being positioned. It is positioned based on the same monitor coordinates though, which are correct…
My first suspicion is that something else moves the window after it positions itself. I remembered reading in GTK docs that some window managers ignore window move requests until after the window becomes visible, instead doing their own "smart" window positioning. So I added (024bfb6), which tries to reposition the window correctly again after the window becomes visible.
Could you test again with that change included? It's on the master
branch.
from hudkit.
Related Issues (16)
- multi-display bug and feature request HOT 3
- Feature request: Recognise keyboard button presses globally, and pass them to addEventListener in page JS HOT 1
- Continuous integration testing HOT 6
- Research brain-dump: Possible implementation paths for handling input events while also passing them through HOT 1
- Can I use this to display a website as my desktop. HOT 7
- The JS API is callback-based; async/await would be prettier HOT 1
- Feedback on using with Linux Mint (mentioning clang in dependencies is necessary?) HOT 1
- Hot cool demonstration GIF in the readme HOT 2
- multi-monitor support seems to not work HOT 5
- "Frame load interrupted" error when loading pages directly from filesystem, with the `file://` protocol HOT 1
- Compiling with Nix toolchain HOT 4
- shell subprocessing + keyboard support? questions HOT 6
- Hudkit going behind windows? HOT 3
- Overlay extends off-monitor HOT 2
- On WSL2: Cannot clickthrough example hud HOT 1
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 hudkit.