Commit d1d0a50
wayland: If GTK is disabled, try to avoid libdecor's GTK plugin
As described in the previous commit, loading GTK while setuid or setgid
would result in the process exiting. This is equally true if it's loaded
indirectly, for a libdecor plugin.
libdecor doesn't currently have any API by which it can be asked to
avoid specific plugins, but its GTK plugin declines to initialize if it
detects a non-main thread (because GTK documents that it must only be
used from the main thread), resulting in libdecor falling back to the
lower-priority Cairo plugin. We can make use of this by intentionally
initializing libdecor on another thread if we have been asked to avoid
GTK. This is a bit of a hack, but at worst it should be harmless.
Resolves: libsdl-org/sdl2-compat#564
Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit 370e940)1 parent aeca6a7 commit d1d0a50
1 file changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
1380 | 1381 | | |
1381 | 1382 | | |
1382 | 1383 | | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1383 | 1397 | | |
1384 | 1398 | | |
1385 | 1399 | | |
| |||
1389 | 1403 | | |
1390 | 1404 | | |
1391 | 1405 | | |
1392 | | - | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1393 | 1418 | | |
1394 | 1419 | | |
1395 | 1420 | | |
| |||
0 commit comments