mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
GTK: fix return type of window-state-event handler.
The event should return a 'gboolean', indicating whether the event needs propagating any further. We were returning void, which meant that the default handling might be accidentally suppressed. On Wayland, this had the particularly nasty effect that window redraws would stop completely if you maximised the terminal window. (By trial and error I found that this stopped happening if I removed GDK_HINT_RESIZE_INC from the geometry hints, from which I guess that the default window-state-event handler is doing something important relating to that hint, or would have been if we hadn't accidentally suppressed it. But the bug is clearly here.)
This commit is contained in:
parent
0e630bc4f1
commit
adf8fc1ab0
@ -651,12 +651,13 @@ gint delete_window(GtkWidget *widget, GdkEvent *event, GtkFrontend *inst)
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(2,0,0)
|
||||
static void window_state_event(GtkWidget *widget, GdkEventWindowState *event,
|
||||
gpointer user_data)
|
||||
static gboolean window_state_event(
|
||||
GtkWidget *widget, GdkEventWindowState *event, gpointer user_data)
|
||||
{
|
||||
GtkFrontend *inst = (GtkFrontend *)user_data;
|
||||
term_notify_minimised(
|
||||
inst->term, event->new_window_state & GDK_WINDOW_STATE_ICONIFIED);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user