Skip to content

Commit

Permalink
Merge pull request #552 from vyivel/layer-surface-destruction-order
Browse files Browse the repository at this point in the history
Destroy zwlr_layer_surface_v1 before wl_surface
  • Loading branch information
rcaelers authored Jun 26, 2024
2 parents 6c237ec + b7bc20a commit 3ae0342
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/app/toolkits/gtkmm/BreakWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -762,15 +762,15 @@ BreakWindow::stop()
frame->set_frame_flashing(0);
}

hide();

#if defined(HAVE_WAYLAND)
if (window_manager)
{
window_manager->clear_surfaces();
}
#endif

hide();

#if defined(PLATFORM_OS_WINDOWS)
if (desktop_window != nullptr)
{
Expand Down
4 changes: 4 additions & 0 deletions ui/app/toolkits/gtkmm/platforms/unix/WaylandWindowManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ LayerSurface::LayerSurface(struct zwlr_layer_shell_v1 *layer_shell,
wl_display_roundtrip(display);
}

LayerSurface::~LayerSurface() {
zwlr_layer_surface_v1_destroy(this->layer_surface);
}

void
LayerSurface::layer_surface_configure(void *data,
struct zwlr_layer_surface_v1 *surface,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LayerSurface
{
public:
LayerSurface(struct zwlr_layer_shell_v1 *layer_shell, Gtk::Widget &window, Glib::RefPtr<Gdk::Monitor> monitor, bool keyboard_focus);
~LayerSurface() = default;
~LayerSurface();

private:
static void layer_surface_configure(void *data,
Expand Down

0 comments on commit 3ae0342

Please sign in to comment.