M README.md => README.md +1 -1
@@ 17,7 17,7 @@ There are no configuration options for now.
## Dependencies
-* GtkLock 3.0.x
+* GtkLock 4.0.x
* GTK+ 3
Additionally, for building:
M meson.build => meson.build +1 -1
@@ 5,7 5,7 @@ project('gtklock-dpms-module', 'c',
'c_std=c11',
],
license: 'GPL-3.0-only',
- version: '3.0.0',
+ version: '4.0.0',
)
version = meson.project_version().split('.')
M module.c => module.c +5 -12
@@ 19,6 19,7 @@ struct Window {
struct GtkLock {
GtkApplication *app;
void *lock;
+ pid_t parent;
GArray *windows;
GArray *messages;
@@ 28,9 29,10 @@ struct GtkLock {
gboolean hidden;
guint idle_timeout;
- guint draw_clock_source;
+ guint draw_time_source;
guint idle_hide_source;
+ gboolean follow_focus;
gboolean use_idle_hide;
};
@@ 303,8 305,8 @@ on_idle_show(struct GtkLock *gtklock)
set_outputs_powered(TRUE);
}
-static void
-handle_locked(struct GtkLock *gtklock)
+G_MODULE_EXPORT void
+on_locked(struct GtkLock *gtklock)
{
ensure_initialized(gtklock);
g_debug("%s: window = %p", G_STRFUNC, gtklock->focused_window);
@@ 315,12 317,6 @@ handle_locked(struct GtkLock *gtklock)
on_idle_hide(gtklock);
}
-static void
-handle_finished(struct GtkLock *gtklock)
-{
- g_debug("%s:", G_STRFUNC);
-}
-
G_MODULE_EXPORT void
on_activation(struct GtkLock *gtklock)
{
@@ 330,7 326,4 @@ on_activation(struct GtkLock *gtklock)
g_debug("%s: lock = %p, window = %p, hidden = %s", G_STRFUNC,
gtklock->lock, gtklock->focused_window, gtklock->hidden ? "true" : "false");
-
- g_signal_connect_swapped(gtklock->lock, "locked", G_CALLBACK(handle_locked), gtklock);
- g_signal_connect_swapped(gtklock->lock, "finished", G_CALLBACK(handle_finished), gtklock);
}