mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
wayland: try 50 times to create lock file again for login screen
since commit 8c16ac47c1b88fc48ad8ea621a75a86e028a2764, we started creating the login screen on display 1024 instead of display 0. This defeats this logic in try_display: display++; /* If display is above 50, then something's wrong. Just * abort in this case. */ if (display > 50) In practice it doesn't matter much since we only have one login screen in most setups, but we should still fix the bug. This commit introduces a separate counter to keep try of 50 tries, rather than assuming "display number == number of tries". https://bugzilla.gnome.org/show_bug.cgi?id=746545
This commit is contained in:
parent
102fa0e373
commit
a5d1f67c34
@ -228,14 +228,16 @@ create_lockfile (int display, int *display_out)
|
||||
|
||||
char pid[11];
|
||||
int size;
|
||||
int number_of_tries = 0;
|
||||
|
||||
while (!try_display (display, &filename, &fd))
|
||||
{
|
||||
display++;
|
||||
number_of_tries++;
|
||||
|
||||
/* If display is above 50, then something's wrong. Just
|
||||
/* If we can't get a display after 50 times, then something's wrong. Just
|
||||
* abort in this case. */
|
||||
if (display > 50)
|
||||
if (number_of_tries >= 50)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user