Revision f0dd271ccfb77d638b138307570da5f0c974b7cb authored by Rouven Czerwinski on 29 April 2021, 06:49:04 UTC, committed by Simon Ser on 24 June 2021, 16:21:29 UTC
When a criteria places the view into the scratchpad, map_ws is NULL and
trying to access map_ws->fullscreen will result in SIGSEGFAULT with:

  #0  0x0000000000455327 in should_focus (view=0x15a6a70) at ../sway/tree/view.c:604
          prev_con = 0x0
          len = <optimized out>
          seat = 0x12233c0
          prev_ws = 0x1264c80
          map_ws = 0x0
          criterias = <optimized out>
          seat = <optimized out>
          prev_con = <optimized out>
          prev_ws = <optimized out>
          map_ws = <optimized out>
          criterias = <optimized out>
          len = <optimized out>
          num_children = <optimized out>
  #1  view_map (view=view@entry=0x15a6a70, wlr_surface=0x15a5cb0, fullscreen=<optimized out>, fullscreen_output=<optimized out>, decoration=<optimized out>) at ../sway/tree/view.c:809
          __PRETTY_FUNCTION__ = "view_map"
          ws = <optimized out>
          seat = <optimized out>
          node = <optimized out>
          target_sibling = <optimized out>
          container = 0x1625400
          set_focus = <optimized out>
          app_id = <optimized out>
          class = <optimized out>
  #2  0x0000000000423a7e in handle_map (listener=0x15a6c78, data=<optimized out>) at ../sway/desktop/xdg_shell.c:454
          xdg_shell_view = 0x15a6a70
          view = 0x15a6a70
          xdg_surface = 0x15a6620
          csd = <optimized out>
  #3  0x00007f508bd3674c in wlr_signal_emit_safe (signal=signal@entry=0x15a6718, data=data@entry=0x15a6620) at ../subprojects/wlroots/util/signal.c:29
          pos = 0x15a6c78
          l = 0x15a6c78
          cursor = {link = {prev = 0x15a6c78, next = 0x7fff53d58190}, notify = 0x7f508bd366c0 <handle_noop>}
          end = {link = {prev = 0x7fff53d58170, next = 0x15a6718}, notify = 0x7f508bd366c0 <handle_noop>}
  #4  0x00007f508bd15b29 in handle_xdg_surface_commit (wlr_surface=<optimized out>) at ../subprojects/wlroots/types/xdg_shell/wlr_xdg_surface.c:384
          surface = 0x15a6620
  #5  0x00007f508bd2e981 in surface_commit_state (surface=surface@entry=0x15a5cb0, next=next@entry=0x15a5e18) at ../subprojects/wlroots/types/wlr_surface.c:455
          __PRETTY_FUNCTION__ = "surface_commit_state"
          invalid_buffer = <optimized out>
          subsurface = 0x15a6038
  #6  0x00007f508bd2f53b in surface_commit_pending (surface=0x15a5cb0) at ../subprojects/wlroots/types/wlr_surface.c:474
          next_seq = 3
          next_seq = <optimized out>
  #7  surface_commit (client=<optimized out>, resource=<optimized out>) at ../subprojects/wlroots/types/wlr_surface.c:542
          surface = 0x15a5cb0
          subsurface = <optimized out>

If map_ws is NULL we assume the view is places into the scratchpad and
return false as well.

(cherry picked from commit 30e400c0a3d5d11ba15dc4ab6cdcfe2e71cfce01)
1 parent d33f495
History
File Mode Size
.builds
.github
assets
client
common
completions
contrib
include
protocols
sway
swaybar
swaymsg
swaynag
.clang-format -rw-r--r-- 405 bytes
.editorconfig -rw-r--r-- 315 bytes
.gitignore -rw-r--r-- 137 bytes
CONTRIBUTING.md -rw-r--r-- 8.4 KB
LICENSE -rw-r--r-- 1.0 KB
README.de.md -rw-r--r-- 2.2 KB
README.dk.md -rw-r--r-- 2.1 KB
README.es.md -rw-r--r-- 2.0 KB
README.fr.md -rw-r--r-- 2.5 KB
README.ja.md -rw-r--r-- 2.7 KB
README.ko.md -rw-r--r-- 2.1 KB
README.md -rw-r--r-- 3.2 KB
README.nl.md -rw-r--r-- 2.1 KB
README.pl.md -rw-r--r-- 2.1 KB
README.pt.md -rw-r--r-- 2.3 KB
README.ro.md -rw-r--r-- 2.2 KB
README.ru.md -rw-r--r-- 3.1 KB
README.uk.md -rw-r--r-- 3.6 KB
README.zh-CN.md -rw-r--r-- 1.7 KB
README.zh-TW.md -rw-r--r-- 1.9 KB
config.in -rw-r--r-- 6.8 KB
meson.build -rw-r--r-- 8.7 KB
meson_options.txt -rw-r--r-- 990 bytes
sway.desktop -rw-r--r-- 97 bytes

README.md

back to top