Comments (15)
From what I understand, they should already be supported, but only if you're using hardware cursors (although I've never figured out how to fix the warn: wayland.c:1512: no server-side cursors available, falling back to client-side cursors
message, and WLR_NO_HARDWARE_CURSORS=0
doesn't change this)
from cage.
Though to answer your question, run sudo libinput list-devices
to check for pointer devices, which would be indicated by the Capabilities: pointer
line.
from cage.
Current logic is quite "simple". If any input device has pointer capability, show the cursor. If not, do not show any cursor. This is how I understand it.
Tranparent cursor or removing images loaded by Xcursor should do the trick for your case.
from cage.
I have a (admittedly janky) solution to hiding the cursor, which is just removing or hiding /usr/share/icons/*/cursors
from cage
(e.g. Set InaccesiblePaths=/usr/share/icons/
in the systemd service that executes cage
).
Outside of that hack, or this patch, I don't believe cage
provides a way to disable the cursor; trying some of the WLR_*
env vars from this cursor-related patch didn't seem to work.
from cage.
Thanks for the tip! I also noticed setting the XCURSOR_THEME
seemed to have no effect as well. I wanted to set it to this theme here: https://github.com/johnodon/Transparent_Cursor_Theme
I ultimately ended up replacing all the themes with the above mentioned to get it to work, but I like the inaccessible path approach better frankly. I'll try that and see if it takes effect.
from cage.
InaccesiblePaths=/usr/share/icons/
didn't work for me :( let me know if you get that working properly and maybe send over an example.
from cage.
Hmm, you're right. Ironically, I was assuming a cursor package I installed was what allowed me to see a cursor in cage
, so you discovering that has made my life a little simple (thanks for that!), but yeah, I'll need to do some investigating into how I managed to break cursors in the first place.
EDIT: Okay, so cage
uses client-side cursors, which usually means that the XCURSOR_*
env vars aren't respected in most Wayland clients. But also, the reason my cursor wasn't showing at some point in the past was because I was using a different renderer for cage
(a non-pixman
renderer), which is what broke them originally
from cage.
If I remember correctly, if no pointer input is available no cursor should be displayed by Cage. Could you check the inputs seen by the compositor?
from cage.
How would I check the inputs? Sorry for the ignorance, don’t really know what I am doing as it relates to the compositor :(
Based on my ignorant reading of the relevant PR my understanding was that if a touch device is found it hides the cursor. Subtly different from no pointer devices found (which should be my case). But even if a pointer device is present I prefer to make it disappear after a certain inactivity timeout. When I was messing with sway it had setting of this nature (which incidentally didn’t work when set in the config file but did work if I sent a swaymsg).
Regarding the cursor env vars, those variables are actually explicitly called out in the docs as supported so we probably want to update the docs if indeed they are ignored.
from cage.
Maybe this is why it still shows up for me even if I don't have a keyboard/mouse plugged in?
libinput list-devices
Device: vc4-hdmi
Kernel: /dev/input/event0
Group: 1
Seat: seat0, default
Capabilities: keyboard pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: *button
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive custom
Rotation: n/a
Seems odd an hdmi device is a keyboard and a pointer but I suppose it's something to do with cec?
from cage.
This pointer device should be exactly why a cursor is displayed: here in the code. HDMI-CEC seems to be a good explanation.
Maybe you can disable it at udev / libinput layer as there is no option (yet?) to disable cursor in Cage.
from cage.
Thanks for looking that up! I think the transparent cursor is the better option in my case as someone may have a mouse plugged in etc. That should work perfectly well until a proper inactivity or similar solution is available.
I think the current logic (as I understand it) is sound:
- if any touch devices present hide the cursor
- If 0 pointer devices present hide the cursor
additionally the 3rd bit would be:
- if pointer is visible (no touch devices present) then hide after x period of inactivity.
As an interim solution, maybe it would be possible currently to default the position to the upper left corner or something instead of sitting dead center of the content area. Would at least make it a little less noticeable.
from cage.
Yeah, would be good to understand why the env vars don't seem to be working. For example setting the cursor path to /dev/null would be cleaner than replacing all cursors...or even setting the theme properly would be great as well. Perhaps I have something messed up on my end preventing those from working as desired?
from cage.
Here are two possible solutions with udev:
- To ignore an input device: https://wayland.freedesktop.org/libinput/doc/latest/ignoring-devices.html#ignoring-devices
- To only enable the keyboard capability on a specific device (and disable all other capabilities including pointer): https://wayland.freedesktop.org/libinput/doc/latest/device-configuration-via-udev.html#udev-device-type
from cage.
Cage handles the cursor differently than Weston. When I start the same electron application with cage as compositor, there is a cursor in the center of the screen (although only a touch screen is connected, no mouse). When I start the application with weston as compositor, the cursor is NOT displayed. So it would be nice if cage could use the same logic for displaying the cursor as weston does.
from cage.
Related Issues (20)
- feature: ability to change keyboard layout while running HOT 4
- Firefox/chrome kiosk allows restricted keyboard shortcuts HOT 4
- cage crashes with -r rotate the output 90 degrees clockwise HOT 6
- Failed to enable unit: Cannot alias [email protected] as display-manager.service HOT 6
- Does Cage not work with Tauri apps? HOT 3
- Matching touch input to rotated screen - how to find my output device name HOT 2
- DRM panel orientation not taken into account HOT 3
- Screen sharing via apps like TeamViewer and AnyDesk, is unattended mode possible in Wayland? HOT 4
- Support wlr-layer-shell as a Backend HOT 1
- Build Fails on wlroots 0.17.2-1 HOT 6
- Cage doesn't seem to auto-activate the client until the first input HOT 5
- Persisting Data HOT 3
- Unable to create wlroots backend HOT 6
- Add an IRC channel for communication
- Cannot launch in X11 session HOT 5
- XDG_RUNTIME_DIR is not set in the environment HOT 6
- Release new version HOT 1
- [QUESTION] Running a second app? HOT 2
- Segfault on SIGTERM leaving the display hanging
- error on raspberr pi os HOT 7
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 cage.