Skip to content

Commit

Permalink
fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jovanlanik committed Apr 17, 2024
1 parent f1e08f8 commit c614171
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/gtklock.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ struct GtkLock* create_gtklock(void) {
}

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();
Expand Down
4 changes: 3 additions & 1 deletion src/source.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ static GOptionEntry debug_entries[] = {
static pid_t parent = -2;

static void monitors_added(GdkDisplay *display, GdkMonitor *monitor, gpointer user_data) {
if(window_by_monitor(monitor) == NULL) create_window(monitor);
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);
}

Expand Down

0 comments on commit c614171

Please sign in to comment.