GTK4 and ext-session-lock-v1 #57
Unanswered
happenslol
asked this question in
Q&A
Replies: 1 comment
-
Hi! Seems like you're on the right track. The main issue with using the session lock protocol with GTK is indeed stopping GTK from creating an XDG shell surface. I strongly suggest using the approach this library does, as explained here and mostly implemented here. Since |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
I'm looking to implement a screen locker with the
ext-session-lock-v1
protocol using GTK4, and I thought this might be a good place to get some help since this project also had to work around the fact that custom surface support was removed.The session lock protocol requires the user to pass a surface for each screen, which will be exclusively displayed on that screen. In GTK3, that was possible like this (in rust):
Since
gdk_wayland_window_set_use_custom_surface
has been removed in GTK4, I've had a look at the code to figure out what it actually does. The only 2 places that are affected by theuse_custom_surface
flag in GTK3.24 are window mapping (which is aborted early if the flag is set) andshould_inhibit_size
(which is alwaysFALSE
if the flag is set). I feel like it should somehow be possible to prevent these 2 things in GTK4 as well.It seems from reading the discussions on the gtk3 repo for this library that a lot of the difficulty with porting this library came from the fact that
2 is definitely not a problem, since the session lock protocol only allows one surface per screen, which rules out popups in general. I haven't tested yet if the wayland client libraries are fine with receiving an XDG surface, I'll do that later today.
Does anyone have any thoughts on how this could work? Could techniques from this library be used to help me? Are there other effects of
use_custom_surface
that I've missed?Beta Was this translation helpful? Give feedback.
All reactions