Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gtklock for openSUSE:Factory checked 
in at 2024-04-21 20:27:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gtklock (Old)
 and      /work/SRC/openSUSE:Factory/.gtklock.new.26366 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gtklock"

Sun Apr 21 20:27:00 2024 rev:4 rq:1169352 version:3.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/gtklock/gtklock.changes  2023-05-07 
18:54:40.812157910 +0200
+++ /work/SRC/openSUSE:Factory/.gtklock.new.26366/gtklock.changes       
2024-04-21 20:28:29.588589798 +0200
@@ -1,0 +2,8 @@
+Fri Apr 19 14:03:32 UTC 2024 - Joshua Smith <smolsh...@opensuse.org>
+
+- Update to 3.0.0:
+  * New ext-session-lock-v1 support
+  * Switched from make to meson
+  * Added --layout option for loading custom XML layout files
+
+-------------------------------------------------------------------

Old:
----
  v2.1.0.tar.gz

New:
----
  v3.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gtklock.spec ++++++
--- /var/tmp/diff_new_pack.gO82Dx/_old  2024-04-21 20:28:31.052643518 +0200
+++ /var/tmp/diff_new_pack.gO82Dx/_new  2024-04-21 20:28:31.052643518 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package gtklock
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,35 +17,42 @@
 
 
 Name:           gtklock
-Version:        2.1.0
+Version:        3.0.0
 Release:        0
 Summary:        GTK-based lockscreen for Wayland
 License:        GPL-3.0-only
 URL:            https://github.com/jovanlanik/gtklock
 Source:         
https://github.com/jovanlanik/gtklock/archive/refs/tags/v%{version}.tar.gz
+BuildRequires:  cmake
 BuildRequires:  gtk-layer-shell-devel
 BuildRequires:  libjson-c-devel
+BuildRequires:  meson
 BuildRequires:  pam-devel
 BuildRequires:  pkgconfig
 BuildRequires:  scdoc
 BuildRequires:  pkgconfig(gtk+-3.0)
+BuildRequires:  pkgconfig(gtk-session-lock-0)
 BuildRequires:  pkgconfig(wayland-client)
 
 %description
 gtklock is a lockscreen based on gtkgreet. It uses the wlr-layer-shell and 
wlr-input-inhibitor Wayland protocols. Works on sway and other wlroots-based 
compositors.
 
 %prep
-%setup -q
+%autosetup
 
 %build
-%make_build
+%meson
+%meson_build
 
 %install
-%make_install PREFIX="%{_prefix}"
+%meson_install
 # distro provided pam files should be in _pam_vendordir
 mkdir -p %{buildroot}%{_pam_vendordir}
 mv %{buildroot}%{_sysconfdir}/pam.d/* %{buildroot}%{_pam_vendordir}/
 
+%check
+%meson_test
+
 %files
 %license LICENSE
 %doc README.md

++++++ v2.1.0.tar.gz -> v3.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/.clangd new/gtklock-3.0.0/.clangd
--- old/gtklock-2.1.0/.clangd   1970-01-01 01:00:00.000000000 +0100
+++ new/gtklock-3.0.0/.clangd   2024-04-18 20:31:22.000000000 +0200
@@ -0,0 +1,2 @@
+CompileFlags:
+  CompilationDatabase: builddir/       # Search builddir/ directory for 
compile_commands.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/.gitignore new/gtklock-3.0.0/.gitignore
--- old/gtklock-2.1.0/.gitignore        2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/.gitignore        2024-04-18 20:31:22.000000000 +0200
@@ -1,9 +1 @@
-/build/
-/.cache/
-/gtklock
-/gtklock.1
-compile_flags.txt
-compile_commands.json
-*-client-protocol.h
-*-client-protocol.c
-*.o
+/builddir/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/README.md new/gtklock-3.0.0/README.md
--- old/gtklock-2.1.0/README.md 2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/README.md 2024-04-18 20:31:22.000000000 +0200
@@ -4,7 +4,7 @@
 
![screenshot](https://user-images.githubusercontent.com/21199271/169707623-2ac5f02b-b6ed-461a-b9a3-5d96440843a2.png)
 ## About
 gtklock is a lockscreen based on 
[gtkgreet](https://git.sr.ht/~kennylevinsen/gtkgreet).
-It uses the wlr-layer-shell and wlr-input-inhibitor Wayland protocols.
+It uses the ext-session-lock Wayland protocol.
 Works on sway and other wlroots-based compositors.
 
 ℹ️ __For documentation, check out the [man 
page](https://man.voidlinux.org/gtklock) and 
[wiki](https://github.com/jovanlanik/gtklock/wiki).__
@@ -20,20 +20,20 @@
 ❤️ __Please submit an installation command for your distro!__
 ## Building from source
 ```
-$ make
-# make install
+$ meson setup builddir
+$ ninja -C builddir
+# meson install -C builddir
 ```
 ### Dependencies
-- GNU Make (build-time)
+- Meson (build-time)
 - pkg-config (build-time)
-- scdoc (build-time)
+- scdoc (optional, build-time)
 - PAM
-- wayland-client
 - gtk+3.0
-- gtk-layer-shell
-### Install dependencies
-- Arch: `# pacman -S gcc make pkgconf scdoc pam wayland gtk3 gtk-layer-shell`
-- Fedora: `# dnf install gcc make pkgconf scdoc pam-devel wayland-devel 
gtk3-devel gtk-layer-shell-devel`
-- Void: `# xbps-install gcc make pkgconf scdoc pam-devel wayland-devel 
gtk+3-devel gtk-layer-shell-devel`
+- [gtk-session-lock](https://github.com/Cu3PO42/gtk-session-lock)
+### Installing build dependencies
+- Arch: `# yay -S gcc meson pkgconf scdoc pam wayland gtk3 gtk-session-lock`
+- Fedora: `# dnf install gcc meson pkgconf scdoc pam-devel wayland-devel 
gtk3-devel`, install gtk-session-lock manually
+- Void: `# xbps-install gcc meson pkgconf scdoc pam-devel wayland-devel 
gtk+3-devel`, install gtk-session-lock manually
 
 ❤️ __Please submit an dependency installation command for your distro!__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/include/gtklock.h 
new/gtklock-3.0.0/include/gtklock.h
--- old/gtklock-2.1.0/include/gtklock.h 2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/include/gtklock.h 2024-04-18 20:31:22.000000000 +0200
@@ -6,11 +6,14 @@
 #pragma once
 
 #include <gtk/gtk.h>
+#include <gtk-session-lock.h>
 
 struct Window;
 
 struct GtkLock {
        GtkApplication *app;
+       GtkSessionLockLock *lock;
+
        GArray *windows;
        GArray *messages;
        GArray *errors;
@@ -22,13 +25,12 @@
        guint draw_clock_source;
        guint idle_hide_source;
 
-       gboolean use_layer_shell;
-       gboolean use_input_inhibit;
        gboolean use_idle_hide;
 
        char *time;
        char *time_format;
        char *config_path;
+       char *layout_path;
 
        GArray *modules;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/include/input-inhibitor.h 
new/gtklock-3.0.0/include/input-inhibitor.h
--- old/gtklock-2.1.0/include/input-inhibitor.h 2023-05-06 15:44:22.000000000 
+0200
+++ new/gtklock-3.0.0/include/input-inhibitor.h 1970-01-01 01:00:00.000000000 
+0100
@@ -1,10 +0,0 @@
-// gtklock
-// Copyright (c) 2022 Jovan Lanik
-
-// wlr-input-inhibitor
-
-#pragma once
-
-void input_inhibitor_get(void);
-void input_inhibitor_destroy(void);
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/include/window.h 
new/gtklock-3.0.0/include/window.h
--- old/gtklock-2.1.0/include/window.h  2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/include/window.h  2024-04-18 20:31:22.000000000 +0200
@@ -23,13 +23,12 @@
        GtkWidget *warning_label;
        GtkWidget *clock_label;
 
-       gulong enter_notify_handler;
-
        void *module_data[];
 };
 
 struct Window *window_by_widget(GtkWidget *window);
 struct Window *window_by_monitor(GdkMonitor *monitor);
+struct Window *window_last_active(void);
 struct Window *create_window(GdkMonitor *monitor);
 void window_idle_hide(struct Window *win);
 void window_idle_show(struct Window *win);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/makefile new/gtklock-3.0.0/makefile
--- old/gtklock-2.1.0/makefile  2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/makefile  1970-01-01 01:00:00.000000000 +0100
@@ -1,93 +0,0 @@
-# gtklock
-# Copyright (c) 2022 Jovan Lanik
-
-# Makefile
-
-NAME := gtklock
-MAJOR_VERSION := 2
-MINOR_VERSION := 1
-MICRO_VERSION := 0
-
-PREFIX = /usr/local
-SYSCONFDIR = $(PREFIX)/etc
-
-ifeq '$(shell uname)' 'Linux'
-       SYSCONFDIR = /etc
-endif
-
-INSTALL = install
-
-LIBS := wayland-client gtk+-wayland-3.0 gtk-layer-shell-0 gmodule-export-2.0
-
-PAMFLAGS := $(shell pkg-config --cflags pam)
-PAMLIBS := $(shell pkg-config --libs pam)
-ifneq '$(.SHELLSTATUS)' '0'
-       PAMLIBS := -lpam
-endif
-
-PKGFLAGS := $(shell pkg-config --cflags $(LIBS))
-ifneq '$(.SHELLSTATUS)' '0'
-       $(error pkg-config failed)
-endif
-
-PKGLIBS := $(shell pkg-config --libs $(LIBS))
-ifneq '$(.SHELLSTATUS)' '0'
-       $(error pkg-config failed)
-endif
-
-CFLAGS += -std=c11 -Iinclude -DPREFIX=$(PREFIX) $(PAMFLAGS) $(PKGFLAGS)
-CFLAGS += -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) 
-DMICRO_VERSION=$(MICRO_VERSION)
-LDLIBS += -Wl,--export-dynamic $(PAMLIBS) $(PKGLIBS)
-
-OBJ = wlr-input-inhibitor-unstable-v1-client-protocol.o
-OBJ += $(patsubst %.c, %.o, $(wildcard src/*.c))
-OBJ += $(patsubst res/%.gresource.xml, %.gresource.o, $(wildcard 
res/*.gresource.xml))
-
-TRASH = $(OBJ) $(NAME) $(NAME).1
-TRASH += $(wildcard *.gresource.c) $(wildcard *.gresource.h)
-TRASH += $(wildcard *-client-protocol.c) $(wildcard 
include/*-client-protocol.h)
-
-VPATH = src
-.PHONY: all clean install install-bin install-data uninstall
-
-all: $(NAME) $(NAME).1
-
-clean:
-       @rm $(TRASH) | true
-
-install-bin:
-       $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
-       $(INSTALL) $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME)
-
-install-data:
-       $(INSTALL) -d $(DESTDIR)$(SYSCONFDIR)/pam.d
-       $(INSTALL) -m644 pam/$(NAME) $(DESTDIR)$(SYSCONFDIR)/pam.d/$(NAME)
-       $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/man/man1
-       $(INSTALL) -m644 $(NAME).1 $(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1
-
-install: install-bin install-data
-
-uninstall:
-       rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME)
-       rm -f $(DESTDIR)$(SYSCONFDIR)/pam.d/$(NAME)
-       rm -r $(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1
-
-$(NAME): $(OBJ)
-       $(LINK.c) $^ $(LDLIBS) -o $@
-
-%.gresource.c: res/%.gresource.xml
-       glib-compile-resources --generate-source $< --target=$@ --sourcedir=res
-
-%.gresource.h: res/%.gresource.xml
-       glib-compile-resources --generate-header $< --target=$@ --sourcedir=res
-
-%-client-protocol.c: wayland/%.xml
-       wayland-scanner private-code $< $@
-
-include/%-client-protocol.h: wayland/%.xml
-       wayland-scanner client-header $< $@
-
-src/input-inhibitor.c: 
include/wlr-input-inhibitor-unstable-v1-client-protocol.h 
-
-%.1: man/%.1.scd
-       scdoc < $< > $@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/man/gtklock.1.scd 
new/gtklock-3.0.0/man/gtklock.1.scd
--- old/gtklock-2.1.0/man/gtklock.1.scd 2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/man/gtklock.1.scd 2024-04-18 20:31:22.000000000 +0200
@@ -39,6 +39,9 @@
 *-s, --style* <path>
        Load CSS style file.
 
+*-x, --layout* <path>
+       Load XML layout file.
+
 *-m, --modules* <name>
        Load gtklock modules. Module name can be an absolute path, relative path
        (starting with ./ or ../) or name in system directory (such as
@@ -61,11 +64,14 @@
        Start with input form hidden.
 
 *-L, --lock-command*
-       Command to execute before locking. Command is executed asynchronously.
+       Command to execute after locking. Command is executed asynchronously.
 
 *-U, --unlock-command*
        Command to execute after unlocking. Command is executed asynchronously.
 
+*-M, --monitor-priority* <name>
+       Set monitor focus priority. Option can be specified multiple times.
+
 # EXAMPLE
 
 Example config:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/man/meson.build 
new/gtklock-3.0.0/man/meson.build
--- old/gtklock-2.1.0/man/meson.build   1970-01-01 01:00:00.000000000 +0100
+++ new/gtklock-3.0.0/man/meson.build   2024-04-18 20:31:22.000000000 +0200
@@ -0,0 +1,27 @@
+# gtklock
+# Copyright (c) 2023 Jianhua Lu, Jovan Lanik
+
+scdoc = find_program('scdoc', required: get_option('man-pages'))
+
+if scdoc.found()
+  mandir = get_option('mandir')
+  man_files = [
+    'gtklock.1.scd',
+  ]
+  foreach filename : man_files
+    topic = filename.split('.')[-3].split('/')[-1]
+    section = filename.split('.')[-2]
+    output = '@0@.@1@'.format(topic, section)
+
+    custom_target(
+      output,
+      input: filename,
+      output: output,
+      command: scdoc,
+      feed: true,
+      capture: true,
+      install: true,
+      install_dir: '@0@/man@1@'.format(mandir, section)
+    )
+  endforeach
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/meson.build 
new/gtklock-3.0.0/meson.build
--- old/gtklock-2.1.0/meson.build       1970-01-01 01:00:00.000000000 +0100
+++ new/gtklock-3.0.0/meson.build       2024-04-18 20:31:22.000000000 +0200
@@ -0,0 +1,54 @@
+# gtklock
+# Copyright (c) 2023 Jianhua Lu, Jovan Lanik
+
+project(
+  'gtklock', 'c',
+  version : '3.0.0',
+  license : 'GPLv3',
+  default_options : ['c_std=c11']
+)
+
+version = meson.project_version().split('.')
+major_version = version[0]
+minor_version = version[1]
+micro_version = version[2]
+
+gtk = dependency('gtk+-3.0')
+gtk_session_lock = dependency('gtk-session-lock-0')
+gmodule_export = dependency('gmodule-export-2.0')
+pam = dependency('pam')
+
+dependencies = [
+  gtk,
+  gtk_session_lock,
+  gmodule_export,
+  pam,
+]
+
+subdir('man')
+subdir('res')
+subdir('src')
+
+gtklock_set = [
+  gtklock_sources,
+  ui_resources,
+]
+
+executable(
+  meson.project_name(),
+  gtklock_set,
+  include_directories : 'include',
+  dependencies : dependencies,
+  c_args : [
+    '-DPREFIX=' + get_option('prefix'),
+    '-DMAJOR_VERSION=' + major_version,
+    '-DMINOR_VERSION=' + minor_version,
+    '-DMICRO_VERSION=' + micro_version,
+  ],
+  install : true
+)
+
+install_data(
+  'pam/gtklock',
+  install_dir : get_option('sysconfdir') / 'pam.d'
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/meson_options.txt 
new/gtklock-3.0.0/meson_options.txt
--- old/gtklock-2.1.0/meson_options.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/gtklock-3.0.0/meson_options.txt 2024-04-18 20:31:22.000000000 +0200
@@ -0,0 +1 @@
+option('man-pages', type: 'feature', value: 'auto', description: 'Generate and 
install man pages')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/res/gtklock.ui 
new/gtklock-3.0.0/res/gtklock.ui
--- old/gtklock-2.1.0/res/gtklock.ui    2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/res/gtklock.ui    2024-04-18 20:31:22.000000000 +0200
@@ -17,7 +17,7 @@
                <child>
                        <object class="GtkRevealer" id="body-revealer">
                                <property name="transition-type">none</property>
-                               <property name="reveal-child">1</property>
+                               <property name="reveal-child">0</property>
                                <child>
                                        <object class="GtkGrid" id="body-grid">
                                                <property 
name="row-spacing">5</property>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/res/meson.build 
new/gtklock-3.0.0/res/meson.build
--- old/gtklock-2.1.0/res/meson.build   1970-01-01 01:00:00.000000000 +0100
+++ new/gtklock-3.0.0/res/meson.build   2024-04-18 20:31:22.000000000 +0200
@@ -0,0 +1,9 @@
+# gtklock
+# Copyright (c) 2023 Jianhua Lu, Jovan Lanik
+
+gnome = import('gnome')
+
+ui_resources = gnome.compile_resources(
+  'ui-resources', 'ui.gresource.xml',
+  c_name : 'ui',
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/src/gtklock.c 
new/gtklock-3.0.0/src/gtklock.c
--- old/gtklock-2.1.0/src/gtklock.c     2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/src/gtklock.c     2024-04-18 20:31:22.000000000 +0200
@@ -9,13 +9,12 @@
 #include "window.h"
 #include "gtklock.h"
 #include "module.h"
-#include "input-inhibitor.h"
 
 void gtklock_remove_window(struct GtkLock *gtklock, struct Window *win) {
        for(guint idx = 0; idx < gtklock->windows->len; idx++) {
                struct Window *ctx = g_array_index(gtklock->windows, struct 
Window *, idx);
                if(ctx == win) {
-                       g_array_remove_index_fast(gtklock->windows, idx);
+                       g_array_remove_index(gtklock->windows, idx);
                        g_free(ctx);
                        return;
                }
@@ -99,12 +98,17 @@
 }
 
 void gtklock_activate(struct GtkLock *gtklock) {
+       g_application_hold(G_APPLICATION(gtklock->app));
+
+       if(!gtk_session_lock_is_supported())
+               report_error_and_exit("Your compositor doesn't support 
ext-session-lock");
+       gtklock->lock = gtk_session_lock_prepare_lock();
+       gtk_session_lock_lock_lock(gtklock->lock);
+
        gtklock->draw_clock_source = g_timeout_add(1000, 
G_SOURCE_FUNC(gtklock_update_clocks_handler), gtklock);
        gtklock_update_clocks(gtklock);
        if(gtklock->use_idle_hide) gtklock->idle_hide_source =
                g_timeout_add_seconds(gtklock->idle_timeout, 
G_SOURCE_FUNC(gtklock_idle_handler), gtklock);
-       if(gtklock->use_layer_shell) 
g_application_hold(G_APPLICATION(gtklock->app));
-       if(gtklock->use_input_inhibit) input_inhibitor_get();
 }
 
 void gtklock_shutdown(struct GtkLock *gtklock) {
@@ -116,7 +120,8 @@
                g_source_remove(gtklock->idle_hide_source);
                gtklock->idle_hide_source = 0;
        }
-       if(gtklock->use_input_inhibit) input_inhibitor_destroy();
+       gtk_session_lock_lock_unlock_and_destroy(gtklock->lock);
+       gdk_display_sync(gdk_display_get_default());
 }
 
 void gtklock_destroy(struct GtkLock *gtklock) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/src/input-inhibitor.c 
new/gtklock-3.0.0/src/input-inhibitor.c
--- old/gtklock-2.1.0/src/input-inhibitor.c     2023-05-06 15:44:22.000000000 
+0200
+++ new/gtklock-3.0.0/src/input-inhibitor.c     1970-01-01 01:00:00.000000000 
+0100
@@ -1,87 +0,0 @@
-// gtklock
-// Copyright (c) 2022 Sophie Winter, Jovan Lanik
-
-// wlr-input-inhibitor
-
-#include <gdk/gdkwayland.h>
-
-#include "util.h"
-#include "wlr-input-inhibitor-unstable-v1-client-protocol.h"
-
-static struct wl_display *display = NULL;
-static struct wl_registry *registry_global = NULL;
-static struct zwlr_input_inhibit_manager_v1 *input_inhibit_manager_global = 
NULL;
-
-static void registry_handle_global(
-       void *data,
-       struct wl_registry *registry,
-       uint32_t id,
-       const char *interface,
-       uint32_t version
-) {
-       // pull out needed globals
-       if(strcmp(interface, zwlr_input_inhibit_manager_v1_interface.name) != 
0) return;
-       input_inhibit_manager_global = wl_registry_bind(
-               registry,
-               id,
-               &zwlr_input_inhibit_manager_v1_interface,
-               1
-       );
-}
-
-static void registry_handle_global_remove(void *_data, struct wl_registry 
*_registry, uint32_t _id) { }
-
-static const struct wl_registry_listener registry_listener = {
-       .global = registry_handle_global,
-       .global_remove = registry_handle_global_remove,
-};
-
-void input_inhibitor_get(void) {
-       GdkDisplay *gdk_display = gdk_display_get_default();
-       if(gdk_display == NULL) return;
-       if(GDK_IS_WAYLAND_DISPLAY(gdk_display) == FALSE) return;
-
-       display = gdk_wayland_display_get_wl_display(gdk_display);
-       registry_global = wl_display_get_registry(display);
-       wl_registry_add_listener(registry_global, &registry_listener, NULL);
-       wl_display_roundtrip(display);
-
-       if(!input_inhibit_manager_global)
-               report_error_and_exit("Your compositor doesn't support 
wlr-input-inhibitor");
-       
-       
zwlr_input_inhibit_manager_v1_get_inhibitor(input_inhibit_manager_global);
-       if(wl_display_roundtrip(display) == -1 && input_inhibit_manager_global)
-               report_error_and_exit("Failed to inhibit input. Is another 
lockscreen already running?");
-}
-
-void input_inhibitor_destroy(void) {
-       zwlr_input_inhibit_manager_v1_destroy(input_inhibit_manager_global);
-       wl_display_roundtrip(display);
-}
-
-/*
-
-MIT License
-
-Copyright (c) 2020 Sophie Winter
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-*/
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/src/meson.build 
new/gtklock-3.0.0/src/meson.build
--- old/gtklock-2.1.0/src/meson.build   1970-01-01 01:00:00.000000000 +0100
+++ new/gtklock-3.0.0/src/meson.build   2024-04-18 20:31:22.000000000 +0200
@@ -0,0 +1,13 @@
+# gtklock
+# Copyright (c) 2023 Jianhua Lu, Jovan Lanik
+
+gtklock_sources = files([
+  'auth.c',
+  'config.c',
+  'gtklock.c',
+  'module.c',
+  'source.c',
+  'util.c',
+  'window.c',
+  'xdg.c',
+])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/src/module.c 
new/gtklock-3.0.0/src/module.c
--- old/gtklock-2.1.0/src/module.c      2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/src/module.c      2024-04-18 20:31:22.000000000 +0200
@@ -60,12 +60,11 @@
                        g_warning("%s: module has mismatched minor version 
(%u), may be incompatible", name, *minor);
        }
        else {
-               const gchar *gtklock_version = "v" STR(MAJOR_VERSION) "." 
STR(MINOR_VERSION) "." STR(MICRO_VERSION);
                const gchar *module_version = NULL;
-               if(g_module_symbol(module, "module_version", (gpointer 
*)&module_version)) {
-                       if(g_strcmp0(gtklock_version, module_version) != 0)
-                               g_warning("%s: module has mismatched version, 
may be incompatible", name);
-               } else g_warning("%s: module has no version info, may be 
incompatible", name);
+               if(g_module_symbol(module, "module_version", (gpointer 
*)&module_version))
+                       report_error_and_exit("%s: module has legacy version 
info (%s), is incompatible", name, module_version);
+               else
+                       report_error_and_exit("%s: module has no version info, 
is incompatible", name);
        }
 
        return module;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/src/source.c 
new/gtklock-3.0.0/src/source.c
--- old/gtklock-2.1.0/src/source.c      2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/src/source.c      2024-04-18 20:31:22.000000000 +0200
@@ -3,14 +3,12 @@
 
 #define _POSIX_C_SOURCE 200809L
 
-#include <assert.h>
 #include <signal.h>
 #include <sys/wait.h>
 #include <glib-unix.h>
 #include <gtk/gtk.h>
 
 #include "util.h"
-#include "auth.h"
 #include "window.h"
 #include "gtklock.h"
 #include "config.h"
@@ -37,8 +35,6 @@
 
 static gboolean show_version = FALSE;
 static gboolean should_daemonize = FALSE;
-static gboolean no_layer_shell = FALSE;
-static gboolean no_input_inhibit = FALSE;
 static gboolean idle_hide = FALSE;
 static gboolean start_hidden = FALSE;
 
@@ -47,11 +43,13 @@
 static gchar *gtk_theme = NULL;
 static gchar *config_path = NULL;
 static gchar *style_path = NULL;
+static gchar *layout_path = NULL;
 static gchar **module_path = NULL;
 static gchar *background_path = NULL;
 static gchar *time_format = NULL;
 static gchar *lock_command = NULL;
 static gchar *unlock_command = NULL;
+static gchar **monitor_priority = NULL;
 
 static GOptionEntry main_entries[] = {
        { "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, "Show version", 
NULL },
@@ -63,92 +61,131 @@
 static GOptionEntry config_entries[] = {
        { "gtk-theme", 'g', 0, G_OPTION_ARG_STRING, &gtk_theme, "Set GTK 
theme", NULL },
        { "style", 's', 0, G_OPTION_ARG_FILENAME, &style_path, "Load CSS style 
file", NULL },
+       { "layout", 'x', 0, G_OPTION_ARG_FILENAME, &layout_path, "Load XML 
layout file", NULL },
        { "modules", 'm', 0, G_OPTION_ARG_FILENAME_ARRAY, &module_path, "Load 
gtklock modules", NULL },
        { "background", 'b', 0, G_OPTION_ARG_FILENAME, &background_path, "Load 
background", NULL },
        { "time-format", 't', 0, G_OPTION_ARG_STRING, &time_format, "Set time 
format", NULL },
        { "idle-hide", 'H', 0, G_OPTION_ARG_NONE, &idle_hide, "Hide form when 
idle", NULL },
        { "idle-timeout", 'T', 0, G_OPTION_ARG_INT, &idle_timeout, "Idle 
timeout in seconds", NULL },
        { "start-hidden", 'S', 0, G_OPTION_ARG_NONE, &start_hidden, "Start with 
hidden form", NULL },
-       { "lock-command", 'L', 0, G_OPTION_ARG_STRING, &lock_command, "Command 
to execute before locking", NULL },
+       { "lock-command", 'L', 0, G_OPTION_ARG_STRING, &lock_command, "Command 
to execute after locking", NULL },
        { "unlock-command", 'U', 0, G_OPTION_ARG_STRING, &unlock_command, 
"Command to execute after unlocking", NULL },
+       { "monitor-priority", 'M', 0, G_OPTION_ARG_STRING_ARRAY, 
&monitor_priority, "Set monitor focus priority", NULL },
        { NULL },
 };
 
 static GOptionEntry debug_entries[] = {
-       { "no-layer-shell", 'l', 0, G_OPTION_ARG_NONE, &no_layer_shell, "Don't 
use wlr-layer-shell", NULL },
-       { "no-input-inhibit", 'i', 0, G_OPTION_ARG_NONE, &no_input_inhibit, 
"Don't use wlr-input-inhibitor", NULL },
        { NULL },
 };
 
 static pid_t parent = -2;
 
-static void reload_outputs(void) {
-       GdkDisplay *display = gdk_display_get_default();
-
-       // Make note of all existing windows
-       GArray *dead_windows = g_array_new(FALSE, TRUE, sizeof(struct Window*));
-       for(guint idx = 0; idx < gtklock->windows->len; idx++) {
-               struct Window *ctx = g_array_index(gtklock->windows, struct 
Window*, idx);
-               g_array_append_val(dead_windows, ctx);
-       }
-
-       // Go through all monitors
-       struct Window *new = NULL;
-       for(int i = 0; i < gdk_display_get_n_monitors(display); i++) {
-               GdkMonitor *monitor = gdk_display_get_monitor(display, i);
-               struct Window *w = window_by_monitor(monitor);
-               if(w != NULL) {
-                       // We already have this monitor, remove from 
dead_windows list
-                       for(guint idx = 0; idx < dead_windows->len; idx++) {
-                               if(w == g_array_index(dead_windows, struct 
Window*, idx)) {
-                                       g_array_remove_index_fast(dead_windows, 
idx);
-                                       break;
-                               }
-                       }
-               } else {
-                       w = create_window(monitor);
-                       gtklock_focus_window(gtklock, w);
-               }
-               new = w;
-       }
+static void monitors_added(GdkDisplay *display, GdkMonitor *monitor, gpointer 
user_data) {
+       struct Window *w = NULL;
+       if(window_by_monitor(monitor) == NULL) w = create_window(monitor);
+       if(w == g_array_index(gtklock->windows, struct Window*, 0)) 
gtklock_focus_window(gtklock, w);
+       module_on_output_change(gtklock);
+}
 
-       // Remove all windows left behind
-       for(guint idx = 0; idx < dead_windows->len; idx++) {
-               struct Window *w = g_array_index(dead_windows, struct Window*, 
idx);
+static void monitors_removed(GdkDisplay *display, GdkMonitor *monitor, 
gpointer user_data) {
+       struct Window *w = window_by_monitor(monitor);
+       if(w != NULL) {
                if(gtklock->focused_window == w) {
+                       struct Window *any_window = 
g_array_index(gtklock->windows, struct Window*, 0);
+                       if(any_window == w) any_window = 
g_array_index(gtklock->windows, struct Window*, 1);
+
                        gtklock->focused_window = NULL;
-                       if(new) window_swap_focus(new, w);
+                       if(any_window) window_swap_focus(any_window, w);
                }
+               gtk_session_lock_unmap_lock_window(GTK_WINDOW(w->window));
                gtk_widget_destroy(w->window);
        }
-
-       g_array_unref(dead_windows);
        module_on_output_change(gtklock);
 }
 
-static void monitors_changed(GdkDisplay *display, GdkMonitor *monitor) {
-       reload_outputs();
+static void exec_command(const gchar *command) {
+       GError *err = NULL;
+       g_spawn_command_line_async(command, &err);
+       if(err != NULL) {
+               g_warning("Executing `%s` failed: %s", command, err->message);
+               g_error_free(err);
+       }
 }
 
-static gboolean setup_layer_shell(void) {
-       if(!gtklock->use_layer_shell) return FALSE;
-
-       reload_outputs();
-
-       GdkDisplay *display = gdk_display_get_default();
-       g_signal_connect(display, "monitor-added", 
G_CALLBACK(monitors_changed), NULL);
-       g_signal_connect(display, "monitor-removed", 
G_CALLBACK(monitors_changed), NULL);
-       return TRUE;
+static gboolean find_priority_monitor(char *name) {
+       if(monitor_priority) {
+               for(guint i = 0; monitor_priority[i] != NULL; ++i)
+                       if(g_strcmp0(name, monitor_priority[i]) == 0) return 
TRUE;
+       }
+       return FALSE;
+}
+
+static gint compare_priority_monitors(gconstpointer first_ptr, gconstpointer 
second_ptr, gpointer user_data) {
+       const void *first = *(const void **)first_ptr;
+       const void *second = *(const void **)second_ptr;
+       if(first != second && monitor_priority) {
+               GHashTable *names = user_data;
+               char *first_name = g_hash_table_lookup(names, first);
+               char *second_name = g_hash_table_lookup(names, second);
+               gint first_index = -1;
+               gint second_index = -1;
+               for(guint i = 0; monitor_priority[i] != NULL; ++i) {
+                       if(g_strcmp0(first_name, monitor_priority[i]) != 0) 
continue;
+                       first_index = i;
+                       break;
+               }
+               for(guint i = 0; monitor_priority[i] != NULL; ++i) {
+                       if(g_strcmp0(second_name, monitor_priority[i]) != 0) 
continue;
+                       second_index = i;
+                       break;
+               }
+               return first_index - second_index;
+       }
+       return 0;
 }
 
+// See comment in window.c
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 static void activate(GtkApplication *app, gpointer user_data) {
        gtklock_activate(gtklock);
        module_on_activation(gtklock);
-       if(!setup_layer_shell()) {
-               struct Window *win = create_window(NULL);
-               gtklock_focus_window(gtklock, win);
+
+       GdkDisplay *display = gdk_display_get_default();
+       g_signal_connect(display, "monitor-added", G_CALLBACK(monitors_added), 
NULL);
+       g_signal_connect(display, "monitor-removed", 
G_CALLBACK(monitors_removed), NULL);
+
+       GArray *monitors = g_array_new(FALSE, TRUE, sizeof(GdkMonitor *));
+       GArray *priority_monitors = g_array_new(FALSE, TRUE, sizeof(GdkMonitor 
*));
+       GHashTable *priority_monitor_names = 
g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free);
+
+       for(int i = 0; i < gdk_display_get_n_monitors(display); ++i) {
+               char *name = 
gdk_screen_get_monitor_plug_name(gdk_screen_get_default(), i);
+               GdkMonitor *monitor = gdk_display_get_monitor(display, i);
+
+               if(find_priority_monitor(name)) {
+                       g_hash_table_insert(priority_monitor_names, monitor, 
name);
+                       g_array_append_val(priority_monitors, monitor);
+               } else {
+                       g_array_append_val(monitors, monitor);
+                       g_free(name);
+               }
        }
-       if(parent > 0) kill(parent, SIGINT);
+
+       g_array_sort_with_data(priority_monitors, compare_priority_monitors, 
priority_monitor_names);
+       gsize len;
+       gpointer data = g_array_steal(priority_monitors, &len);
+       g_array_prepend_vals(monitors, data, len);
+
+       for(guint idx = 0; idx < monitors->len; idx++) 
create_window(g_array_index(monitors, GdkMonitor *, idx));
+       gtklock_focus_window(gtklock, g_array_index(gtklock->windows, struct 
Window *, 0));
+
+       g_array_unref(monitors);
+       g_array_unref(priority_monitors);
+       g_hash_table_unref(priority_monitor_names);
+
+       if(parent > 0) kill(parent, SIGUSR1);
+       if(lock_command) exec_command(lock_command);
 }
 
 static void shutdown(GtkApplication *app, gpointer user_data) {
@@ -157,6 +194,7 @@
                g_module_close(module);
        }
        gtklock_shutdown(gtklock);
+       if(unlock_command) exec_command(unlock_command);
 }
 
 static void attach_style(const gchar *format, ...) G_GNUC_PRINTF(1, 2);
@@ -203,8 +241,16 @@
        else if(pid != 0) {
                int status;
                waitpid(pid, &status, 0);
-               if(WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS)
-                       exit(EXIT_SUCCESS);
+               if(WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS) {
+                       sigset_t set;
+                       sigemptyset(&set);
+                       sigaddset(&set, SIGUSR1);
+                       sigprocmask(SIG_BLOCK, &set, NULL);
+                       int ret = sigtimedwait(&set, NULL, &(struct timespec){ 
1, 0 });
+                       if(ret == SIGUSR1)
+                               exit(EXIT_SUCCESS);
+                       exit(EXIT_FAILURE);
+               }
                report_error_and_exit("Failed to daemonize!\n");
        }
 
@@ -214,16 +260,6 @@
        else if(pid != 0) exit(EXIT_SUCCESS);
 }
 
-static void exec_command(const gchar *command) {
-       GError *err = NULL;
-
-       g_spawn_command_line_async(command, &err);
-       if(err != NULL) {
-               g_warning("Executing `%s` failed: %s", command, err->message);
-               g_error_free(err);
-       }
-}
-
 static gboolean signal_handler(gpointer data) {
        g_application_quit(G_APPLICATION(gtklock->app));
        return G_SOURCE_REMOVE;
@@ -286,16 +322,12 @@
        if(!g_option_context_parse(option_context, &argc, &argv, &error))
                report_error_and_exit("Option parsing failed: %s\n", 
error->message);
 
-       if(lock_command) exec_command(lock_command);
-
        if(gtk_theme) {
                GtkSettings *settings = gtk_settings_get_default();
                g_object_set(settings, "gtk-theme-name", gtk_theme, NULL);
        }
 
        gtklock = create_gtklock();
-       gtklock->use_layer_shell = !no_layer_shell;
-       gtklock->use_input_inhibit = !no_input_inhibit;
        gtklock->use_idle_hide = idle_hide;
        gtklock->idle_timeout = (guint)idle_timeout;
        gtklock->hidden = start_hidden;
@@ -336,6 +368,7 @@
 
        gtklock->time_format = time_format;
        gtklock->config_path = config_path;
+       gtklock->layout_path = layout_path;
 
        g_signal_connect(gtklock->app, "activate", G_CALLBACK(activate), NULL);
        g_signal_connect(gtklock->app, "shutdown", G_CALLBACK(shutdown), NULL);
@@ -343,7 +376,6 @@
        int status = g_application_run(G_APPLICATION(gtklock->app), argc, argv);
 
        gtklock_destroy(gtklock);
-       if(unlock_command) exec_command(unlock_command);
        return status;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtklock-2.1.0/src/window.c 
new/gtklock-3.0.0/src/window.c
--- old/gtklock-2.1.0/src/window.c      2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/src/window.c      2024-04-18 20:31:22.000000000 +0200
@@ -4,10 +4,9 @@
 // Window functions
 
 #include <time.h>
-#include <assert.h>
 
 #include <gtk/gtk.h>
-#include <gtk-layer-shell.h>
+#include <gtk-session-lock.h>
 
 #include "util.h"
 #include "window.h"
@@ -33,30 +32,10 @@
        return NULL;
 }
 
-static gboolean window_enter_notify(GtkWidget *widget, gpointer data) {
-       struct Window *win = window_by_widget(widget);
-       gtk_entry_grab_focus_without_selecting(GTK_ENTRY(win->input_field));
-       gtklock_focus_window(gtklock, win);
-       return FALSE;
-}
-
-static void window_setup_layer_shell(struct Window *ctx) {
-       gtk_widget_add_events(ctx->window, GDK_ENTER_NOTIFY_MASK);
-       if(ctx->enter_notify_handler > 0) {
-               g_signal_handler_disconnect(ctx->window, 
ctx->enter_notify_handler);
-               ctx->enter_notify_handler = 0;
-       }
-       ctx->enter_notify_handler = g_signal_connect(ctx->window, 
"enter-notify-event", G_CALLBACK(window_enter_notify), NULL);
-
-       gtk_layer_init_for_window(GTK_WINDOW(ctx->window));
-       gtk_layer_set_layer(GTK_WINDOW(ctx->window), 
GTK_LAYER_SHELL_LAYER_OVERLAY);
-       gtk_layer_set_monitor(GTK_WINDOW(ctx->window), ctx->monitor);
-       gtk_layer_set_exclusive_zone(GTK_WINDOW(ctx->window), -1);
-       gtk_layer_set_keyboard_mode(GTK_WINDOW(ctx->window), 
GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE);
-       gtk_layer_set_anchor(GTK_WINDOW(ctx->window), 
GTK_LAYER_SHELL_EDGE_LEFT, TRUE);
-       gtk_layer_set_anchor(GTK_WINDOW(ctx->window), 
GTK_LAYER_SHELL_EDGE_RIGHT, TRUE);
-       gtk_layer_set_anchor(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_TOP, 
TRUE);
-       gtk_layer_set_anchor(GTK_WINDOW(ctx->window), 
GTK_LAYER_SHELL_EDGE_BOTTOM, TRUE);
+struct Window *window_last_active(void) {
+       GtkWindow *window = gtk_application_get_active_window(gtklock->app);
+       if(window) return window_by_widget(GTK_WIDGET(window));
+       return NULL;
 }
 
 void window_update_clock(struct Window *ctx) {
@@ -71,7 +50,7 @@
        for(guint idx = 0; idx < gtklock->errors->len; idx++) {
                char *err = g_array_index(gtklock->errors, char *, idx);
                if(err == data) {
-                       g_array_remove_index_fast(gtklock->errors, idx);
+                       g_array_remove_index(gtklock->errors, idx);
                        g_free(err);
                        window_setup_messages(ctx);
                        return;
@@ -80,7 +59,7 @@
        for(guint idx = 0; idx < gtklock->messages->len; idx++) {
                char *msg = g_array_index(gtklock->messages, char *, idx);
                if(msg == data) {
-                       g_array_remove_index_fast(gtklock->messages, idx);
+                       g_array_remove_index(gtklock->messages, idx);
                        g_free(msg);
                        window_setup_messages(ctx);
                        return;
@@ -213,18 +192,12 @@
 void window_swap_focus(struct Window *win, struct Window *old) {
        if(!gtklock->hidden) 
gtk_revealer_set_reveal_child(GTK_REVEALER(win->body_revealer), TRUE);
 
-       if(gtklock->use_layer_shell)
-               gtk_layer_set_keyboard_mode(GTK_WINDOW(win->window), 
GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE);
-
        GtkStyleContext *win_context = 
gtk_widget_get_style_context(win->window);
        gtk_style_context_add_class(win_context, "focused");
 
        if(old != NULL && old != win) {
                gtk_revealer_set_reveal_child(GTK_REVEALER(old->body_revealer), 
FALSE);
 
-               if(gtklock->use_layer_shell)
-                       gtk_layer_set_keyboard_mode(GTK_WINDOW(old->window), 
GTK_LAYER_SHELL_KEYBOARD_MODE_NONE);
-
                GtkStyleContext *old_context = 
gtk_widget_get_style_context(old->window);
                gtk_style_context_remove_class(old_context, "focused");
 
@@ -245,12 +218,17 @@
                        window_pw_set_vis(GTK_ENTRY(win->input_field), 
gtk_entry_get_visibility(GTK_ENTRY(old->input_field)));
                }
        }
+
+       gtk_entry_grab_focus_without_selecting(GTK_ENTRY(win->input_field));
 }
 
 void window_idle_hide(struct Window *ctx) {
        GtkStyleContext *context = gtk_widget_get_style_context(ctx->window);
        gtk_style_context_add_class(context, "hidden");
        gtk_revealer_set_reveal_child(GTK_REVEALER(ctx->body_revealer), FALSE);
+       GdkCursor *cursor = 
gdk_cursor_new_for_display(gtk_widget_get_display(ctx->window), 
GDK_BLANK_CURSOR);
+       gdk_window_set_cursor(gtk_widget_get_window(ctx->window), cursor);
+       g_object_unref(cursor);
 }
 
 void window_idle_show(struct Window *ctx) {
@@ -260,6 +238,9 @@
                gtk_revealer_set_reveal_child(GTK_REVEALER(ctx->body_revealer), 
TRUE);
                
gtk_entry_grab_focus_without_selecting(GTK_ENTRY(ctx->input_field));
        }
+       GdkCursor *cursor = 
gdk_cursor_new_from_name(gtk_widget_get_display(ctx->window), "default");
+       gdk_window_set_cursor(gtk_widget_get_window(ctx->window), cursor);
+       g_object_unref(cursor);
 }
 
 static gboolean window_idle_key(GtkWidget *self, GdkEventKey event, gpointer 
user_data) {
@@ -291,6 +272,7 @@
 
        g_signal_connect(w->window, "destroy", 
G_CALLBACK(window_destroy_notify), NULL);
        if(gtklock->use_idle_hide || gtklock->hidden) {
+               gtk_widget_add_events(w->window, GDK_POINTER_MOTION_MASK);
                g_signal_connect(w->window, "key-press-event", 
G_CALLBACK(window_idle_key), NULL);
                g_signal_connect(w->window, "motion-notify-event", 
G_CALLBACK(window_idle_motion), NULL);
        }
@@ -313,16 +295,22 @@
        GdkKeymap *keymap = gdk_keymap_get_for_display(display);
        g_signal_connect(keymap, "state-changed", 
G_CALLBACK(window_caps_state_changed), NULL);
 
-       if(name) gtk_widget_set_name(w->window, name);
+       if(name) {
+               gtk_widget_set_name(w->window, name);
+               g_free(name);
+       }
        gtk_window_set_title(GTK_WINDOW(w->window), "Lockscreen");
        gtk_window_set_decorated(GTK_WINDOW(w->window), FALSE);
        gtk_widget_realize(w->window);
-       if(gtklock->use_layer_shell) window_setup_layer_shell(w);
+       gtk_session_lock_lock_new_surface(gtklock->lock, GTK_WINDOW(w->window), 
monitor);
 
        w->overlay = gtk_overlay_new();
        gtk_container_add(GTK_CONTAINER(w->window), w->overlay);
        
-       GtkBuilder *builder = 
gtk_builder_new_from_resource("/gtklock/gtklock.ui");
+       GtkBuilder *builder = NULL;
+       if(gtklock->layout_path) builder = 
gtk_builder_new_from_file(gtklock->layout_path);
+       else builder = gtk_builder_new_from_resource("/gtklock/gtklock.ui");
+       
        gtk_builder_connect_signals(builder, w);
 
        w->window_box = GTK_WIDGET(gtk_builder_get_object(builder, 
"window-box"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gtklock-2.1.0/wayland/wlr-input-inhibitor-unstable-v1.xml 
new/gtklock-3.0.0/wayland/wlr-input-inhibitor-unstable-v1.xml
--- old/gtklock-2.1.0/wayland/wlr-input-inhibitor-unstable-v1.xml       
2023-05-06 15:44:22.000000000 +0200
+++ new/gtklock-3.0.0/wayland/wlr-input-inhibitor-unstable-v1.xml       
1970-01-01 01:00:00.000000000 +0100
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<protocol name="wlr_input_inhibit_unstable_v1">
-  <copyright>
-    Copyright © 2018 Drew DeVault
-
-    Permission to use, copy, modify, distribute, and sell this
-    software and its documentation for any purpose is hereby granted
-    without fee, provided that the above copyright notice appear in
-    all copies and that both that copyright notice and this permission
-    notice appear in supporting documentation, and that the name of
-    the copyright holders not be used in advertising or publicity
-    pertaining to distribution of the software without specific,
-    written prior permission.  The copyright holders make no
-    representations about the suitability of this software for any
-    purpose.  It is provided "as is" without express or implied
-    warranty.
-
-    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-    THIS SOFTWARE.
-  </copyright>
-
-  <interface name="zwlr_input_inhibit_manager_v1" version="1">
-    <description summary="inhibits input events to other clients">
-      Clients can use this interface to prevent input events from being sent to
-      any surfaces but its own, which is useful for example in lock screen
-      software. It is assumed that access to this interface will be locked down
-      to whitelisted clients by the compositor.
-    </description>
-
-    <request name="get_inhibitor">
-      <description summary="inhibit input to other clients">
-        Activates the input inhibitor. As long as the inhibitor is active, the
-        compositor will not send input events to other clients.
-      </description>
-      <arg name="id" type="new_id" interface="zwlr_input_inhibitor_v1"/>
-    </request>
-
-    <enum name="error">
-      <entry name="already_inhibited" value="0" summary="an input inhibitor is 
already in use on the compositor"/>
-    </enum>
-  </interface>
-
-  <interface name="zwlr_input_inhibitor_v1" version="1">
-    <description summary="inhibits input to other clients">
-      While this resource exists, input to clients other than the owner of the
-      inhibitor resource will not receive input events. Any client which
-      previously had focus will receive a leave event and will not be given
-      focus again. The client that owns this resource will receive all input
-      events normally. The compositor will also disable all of its own input
-      processing (such as keyboard shortcuts) while the inhibitor is active.
-
-      The compositor may continue to send input events to selected clients,
-      such as an on-screen keyboard (via the input-method protocol).
-    </description>
-
-    <request name="destroy" type="destructor">
-      <description summary="destroy the input inhibitor object">
-        Destroy the inhibitor and allow other clients to receive input.
-      </description>
-    </request>
-  </interface>
-</protocol>

Reply via email to