Replies: 4 comments 1 reply
-
Hm, what operating system / windowing system are you targeting? Perhaps what you're trying to do could be done with the platform api, but it really depends on the environment. |
Beta Was this translation helpful? Give feedback.
-
Linux/Wayland. Running on Raspberry Pi 3. At the moment using the cage compositor. But that was a bit of a pain to setup, requiring raspbian testing + wlroots from Debian experimental. Might try redoing this setup with https://swaywm.org/ which I think should work in Raspbian bullseye. Is that enough details? I think I have been fixated solving this at the application layer. But you are right, maybe there are other options here. |
Beta Was this translation helpful? Give feedback.
-
There is one advantage doing this at the application layer: I have more control, and e.g. can turn on the display if my application receives a significant event. I don't think I can do this if I do it at a higher level. |
Beta Was this translation helpful? Give feedback.
-
Might need to think about this a bit more. Ideally a solution would be platform independent... I have been experimenting with swayidle to send sway commands to turn on/off the screen. But noticed another issue - if I touch the display to turn the screen on, I also invoke what ever option I just touched (but couldn't see). So perhaps someway to disable screen events when the screen is off might be useful too. I guess if I created my own event loop I could do that. I probably do need hardware rendering, the RPI3 isn't exactly fast. I am not sure how I would write an event loop. Presumably I would replace my |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I would like to be able to turn off the screen when there has not been any user interaction, say for the last 3 minutes. I can write the appropriate
screen_on
andscreen_off
functions here.However I need to be able to receive any events that occur whenever a mouse event is received, so I can cancel and restart the timer. Is this possible?
I guess I could reset the timer in every callback, but this seems yuck, wondering if there is a better way.
Regards
Beta Was this translation helpful? Give feedback.
All reactions