gtk: Persist panel state

Creating and destroying the panel as needed causes a resource leak somewhere in the deeper layers of the stack. This is a workaround.

See https://gitlab.gnome.org/World/Phosh/squeekboard/-/issues/343
This commit is contained in:
Dorota Czaplejewicz
2022-07-01 08:07:25 +00:00
parent 50ef4ab433
commit 70bf101812
2 changed files with 36 additions and 41 deletions

View File

@ -13,8 +13,10 @@ struct panel_manager {
struct squeek_popover *popover; // shared reference
struct submission *submission; // unowned
// both memoized - doesn't have to be, but bugs happen:
// https://gitlab.gnome.org/World/Phosh/squeekboard/-/issues/343
PhoshLayerSurface *window;
GtkWidget *widget; // nullable
GtkWidget *widget;
// Those should be held in Rust
struct wl_output *current_output;