Window misbehaves if dragged during resize
Bug summary
I have an application window that changes size. If somebody tries to drag that window during resize then either:
- Xorg: window shrinks on its own
- Wayland: window behaves like it wasn't there (you can click through it to underneath window)
Expected outcome
Window can be dragged during resize and window maintains it's size and resize animation the same way as when not dragged.
Version information
- Mutter 3.38.3
- GNOME Shell 3.38.3
- GTK 4.1.1
GTK4 example reproducer
#include <gtk/gtk.h>
static gboolean is_increase = FALSE;
gboolean
on_tick (GtkWidget *widget, GdkFrameClock *clock, gpointer data)
{
int width, height;
gtk_window_get_default_size (GTK_WINDOW (widget), &width, &height);
if (is_increase) {
height++;
is_increase = (height <= 320);
} else {
height--;
is_increase = (height == 120);
}
gtk_window_set_default_size (GTK_WINDOW (widget), width, height);
return G_SOURCE_CONTINUE;
}
static void
activate (GtkApplication *app, gpointer user_data)
{
GtkWidget *window = gtk_application_window_new (app);
GtkWidget *headerbar = gtk_header_bar_new ();
GtkWidget *label = gtk_label_new ("DRAG ME!");
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (headerbar), label);
gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
gtk_window_set_default_size (GTK_WINDOW (window), 320, 320);
gtk_widget_add_tick_callback (GTK_WIDGET (window), on_tick, NULL, NULL);
gtk_window_present (GTK_WINDOW (window));
}
void
main (int argc, char **argv)
{
GtkApplication *app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
}
gcc `pkg-config --cflags gtk4` -o example example.c `pkg-config --libs gtk4`