File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -365,10 +365,13 @@ void output_manager_apply_notify(wl_listener* listener, void* data) {
365
365
366
366
bool filter_globals (const struct wl_client * client, const struct wl_global * global, void * data) {
367
367
const auto & server = *static_cast <Server*>(data);
368
- const auto * wlr_xwayland = server.xwayland ->wlr ;
369
368
370
- if (global == wlr_xwayland->shell_v1 ->global ) {
371
- return wlr_xwayland->server != nullptr && client == wlr_xwayland->server ->client ;
369
+ if (server.xwayland != nullptr ) {
370
+ const auto * wlr_xwayland = server.xwayland ->wlr ;
371
+
372
+ if (global == wlr_xwayland->shell_v1 ->global ) {
373
+ return wlr_xwayland->server != nullptr && client == wlr_xwayland->server ->client ;
374
+ }
372
375
}
373
376
374
377
const auto * security_context =
@@ -437,7 +440,7 @@ Server::Server() : listeners(*this) {
437
440
wlr_data_device_manager_create (display);
438
441
439
442
security_context_manager = wlr_security_context_manager_v1_create (display);
440
- wl_display_set_global_filter (display, filter_globals, nullptr );
443
+ wl_display_set_global_filter (display, filter_globals, this );
441
444
442
445
// https://wayfire.org/2020/08/04/Wayfire-0-5.html
443
446
wlr_primary_selection_v1_device_manager_create (display);
You can’t perform that action at this time.
0 commit comments