mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Fix segfault when attempting to switch workspace during startup.
This commit is contained in:
parent
6638851238
commit
05be57f687
1 changed files with 7 additions and 4 deletions
11
spectrwm.c
11
spectrwm.c
|
@ -5858,10 +5858,13 @@ ewmh_update_current_desktop(void)
|
|||
int num_screens, i;
|
||||
|
||||
num_screens = get_screen_count();
|
||||
for (i = 0; i < num_screens; ++i)
|
||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE,
|
||||
screens[i].root, ewmh[_NET_CURRENT_DESKTOP].atom,
|
||||
XCB_ATOM_CARDINAL, 32, 1, &screens[i].r_focus->ws->idx);
|
||||
for (i = 0; i < num_screens; ++i) {
|
||||
if (screens[i].r_focus)
|
||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE,
|
||||
screens[i].root, ewmh[_NET_CURRENT_DESKTOP].atom,
|
||||
XCB_ATOM_CARDINAL, 32, 1,
|
||||
&screens[i].r_focus->ws->idx);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue