Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
wlroots
Commits
04c703a2
Commit
04c703a2
authored
Oct 15, 2018
by
Dorota Czaplejewicz
Browse files
phosh: Fix crash when an xdg_surface is missing either a title or an app_id
parent
e266c319
Pipeline
#1549
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
meson.build
View file @
04c703a2
...
...
@@ -54,6 +54,7 @@ egl = dependency('egl')
glesv2 = dependency('glesv2')
drm = dependency('libdrm')
gbm = dependency('gbm', version: '>=17.1.0')
glib = dependency('glib-2.0', version: '>=2.16')
libinput = dependency('libinput', version: '>=1.7.0')
xkbcommon = dependency('xkbcommon')
udev = dependency('libudev')
...
...
rootston/meson.build
View file @
04c703a2
...
...
@@ -19,5 +19,5 @@ if get_option('enable-xwayland')
sources += ['xwayland.c']
endif
executable(
'rootston', sources, dependencies: [wlroots, wlr_protos, pixman]
'rootston', sources, dependencies: [wlroots, wlr_protos, pixman
, glib
]
)
rootston/phosh.c
View file @
04c703a2
#define _POSIX_C_SOURCE 200112L
#include <assert.h>
#include <glib.h>
#include <stdlib.h>
#include <unistd.h>
#include <wayland-server.h>
...
...
@@ -73,16 +74,16 @@ static void xdg_switcher_handle_raise_xdg_surfaces(struct wl_client *client,
if
(
view
->
xdg_surface
->
role
!=
WLR_XDG_SURFACE_ROLE_TOPLEVEL
||
!
view
->
xdg_surface
->
mapped
)
continue
;
if
(
!
strcmp
(
app_id
,
view
->
xdg_surface
->
toplevel
->
app_id
)
&&
!
strcmp
(
title
,
view
->
xdg_surface
->
toplevel
->
title
))
if
(
!
g_
strcmp
0
(
app_id
,
view
->
xdg_surface
->
toplevel
->
app_id
)
&&
!
g_
strcmp
0
(
title
,
view
->
xdg_surface
->
toplevel
->
title
))
found_view
=
view
;
break
;
case
ROOTS_XDG_SHELL_V6_VIEW
:
if
(
view
->
xdg_surface_v6
->
role
!=
WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL
||
!
view
->
xdg_surface_v6
->
mapped
)
continue
;
if
(
!
strcmp
(
app_id
,
view
->
xdg_surface_v6
->
toplevel
->
app_id
)
&&
!
strcmp
(
title
,
view
->
xdg_surface_v6
->
toplevel
->
title
))
if
(
!
g_
strcmp
0
(
app_id
,
view
->
xdg_surface_v6
->
toplevel
->
app_id
)
&&
!
g_
strcmp
0
(
title
,
view
->
xdg_surface_v6
->
toplevel
->
title
))
found_view
=
view
;
break
;
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment