Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
Commits d5eb85b..b4e3a2b
  • Loading branch information
jirutka committed Nov 29, 2023
2 parents f77991e + b4e3a2b commit a77ac83
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
28 changes: 27 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,8 +1744,34 @@ static void term_in(int fd, short mask, void *data) {
state.run_display = false;
}

int main(int argc, char **argv) {
// Check for --debug 'early' we also apply the correct loglevel
// to the forked child, without having to first proces all of the
// configuration (including from file) before forking and (in the
// case of the shadow backend) dropping privileges
void log_init(int argc, char **argv) {
static struct option long_options[] = {
{"debug", no_argument, NULL, 'd'},
{0, 0, 0, 0}
};
int c;
optind = 1;
while (1) {
int opt_idx = 0;
c = getopt_long(argc, argv, "-:d", long_options, &opt_idx);
if (c == -1) {
break;
}
switch (c) {
case 'd':
swaylock_log_init(LOG_DEBUG);
return;
}
}
swaylock_log_init(LOG_ERROR);
}

int main(int argc, char **argv) {
log_init(argc, argv);
initialize_pw_backend(argc, argv);
srand(time(NULL));

Expand Down
4 changes: 0 additions & 4 deletions render.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ void render_frame(struct swaylock_surface *surface) {
return;
}

// Hide subsurface until we want it visible
wl_surface_attach(surface->child, NULL, 0, 0);
wl_surface_commit(surface->child);

cairo_t *cairo = buffer->cairo;
cairo_set_antialias(cairo, CAIRO_ANTIALIAS_BEST);
cairo_font_options_t *fo = cairo_font_options_create();
Expand Down

0 comments on commit a77ac83

Please sign in to comment.