Skip to content

Crash in vswitch #1726

@tsujan

Description

@tsujan

Wayfire (the latest git version) crashes when "send_win_left/right" is used without any window other than a sticky one.

To Reproduce

  1. Have a sticky window like Conky.
  2. Make sure send_win_left and send_win_right are assigned under [vswitch].
  3. Open an ordinary window and move it to another workspace by using one of the above shortcuts, so that there remains no ordinary window in the current workspace.
  4. Use one of the shortcuts again.

Then, Wayfire crashes

Probable Fix

This change fixed the crash here:

diff -ruNp wayfire-orig/plugins/vswitch/vswitch.cpp wayfire/plugins/vswitch/vswitch.cpp
--- wayfire-orig/plugins/vswitch/vswitch.cpp
+++ wayfire/plugins/vswitch/vswitch.cpp
@@ -70,7 +70,7 @@ class vswitch : public wf::per_output_pl
                     return true;
                 }
 
-                if (only_view)
+                if (view && only_view)
                 {
                     auto size = output->get_screen_size();
 

Wayfire version
Latest git (a1f5757)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions