Skip to content

Fix crash on closing last active window

When on_name_changed is called, controlwindow may refer to a window that has been closed. If so, this leads to is_window_on_active_workspace_and_no_other_maximized_windows_above causing a segmentation fault when top_window turns out to be NULL. Since we would like to clear the displayed window title in this case, we should first check whether controlwindow refers to a closed window. It makes sense to do this where we already check if it is NULL or if it refers to the Desktop. We can check this by determining whether the window has a valid PID using wnck_window_get_pid.

From https://github.com/takinoy/xfce4-windowck-plugin/pull/71

Merge request reports