mirror of
https://github.com/labwc/labwc.git
synced 2026-02-24 01:40:15 -05:00
tree-wide: do not try to use outputs with no scene_output
- check for valid scene_output in output_is_usable()
- change many "output != NULL" checks to use output_is_usable()
- remove one now-redundant separate check for valid scene_output
Fixes a crash at startup (with autoEnableOutputs=no) due to
dereferencing null scene_output in create_output_config() since:
7d7ece21d9
("output: suppress error when output position is unavailable")
Fixes: #3357
This commit is contained in:
parent
81778a16bb
commit
4f8b80700e
9 changed files with 24 additions and 31 deletions
|
|
@ -500,7 +500,7 @@ handle_request_maximize(struct wl_listener *listener, void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!view->mapped && !view->output) {
|
||||
if (!view->mapped && !output_is_usable(view->output)) {
|
||||
view_set_output(view, output_nearest_to_cursor(view->server));
|
||||
}
|
||||
bool maximized = toplevel->requested.maximized;
|
||||
|
|
@ -521,7 +521,7 @@ handle_request_fullscreen(struct wl_listener *listener, void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!view->mapped && !view->output) {
|
||||
if (!view->mapped && !output_is_usable(view->output)) {
|
||||
view_set_output(view, output_nearest_to_cursor(view->server));
|
||||
}
|
||||
set_fullscreen_from_request(view,
|
||||
|
|
@ -819,7 +819,7 @@ handle_map(struct wl_listener *listener, void *data)
|
|||
* An output should have been chosen when the surface was first
|
||||
* created, but take one more opportunity to assign an output if not.
|
||||
*/
|
||||
if (!view->output) {
|
||||
if (!output_is_usable(view->output)) {
|
||||
view_set_output(view, output_nearest_to_cursor(view->server));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue