From 078ada75d46ada778b29bc1f94a105c40631c810 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 Jun 2021 18:03:12 +0100 Subject: [PATCH 1/3] docs: Mention Window::close-request in the migration guide The Widget::delete-event signal was moved to Window::close-request. --- docs/reference/gtk/migrating-3to4.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index 9bc982962a..49f3d6c8dd 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -187,11 +187,16 @@ for this change. | ::grab-broken-event | - | Event signals which are not directly related to input have to be dealt with -on a one-by-one basis. If you were using `::configure-event` and -`::window-state-event` to save window state, you should use property -notification for corresponding [class@Gtk.Window] properties, such as -[property@Gtk.Window:default-width], [property@Gtk.Window:default-height], -[property@Gtk.Window:maximized] or [property@Gtk.Window:fullscreened]. +on a one-by-one basis: + + - If you were using `::configure-event` and `::window-state-event` to save + window state, you should use property notification for corresponding + [class@Gtk.Window] properties, such as [property@Gtk.Window:default-width], + [property@Gtk.Window:default-height], [property@Gtk.Window:maximized] or + [property@Gtk.Window:fullscreened]. + - If you were using `::delete-event` to present a confirmation when using + the close button of a window, you should use the + [signal@Gtk.Window::close-request] signal. ### Set a proper application ID From 17373c3e778d8a39d68af3decef593b245fa808a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 Jun 2021 18:08:31 +0100 Subject: [PATCH 2/3] docs: Mention GdkSurface:mapped It replaces the ::map-event and ::unmap-event signals on GtkWidget. --- docs/reference/gtk/migrating-3to4.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index 49f3d6c8dd..f286fc72dc 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -197,6 +197,9 @@ on a one-by-one basis: - If you were using `::delete-event` to present a confirmation when using the close button of a window, you should use the [signal@Gtk.Window::close-request] signal. + - If you were using `::map-event` and `::unmap-event` to track a window + being mapped, you should use property notification for the + [property@Gdk.Surface:mapped] property instead. ### Set a proper application ID From 71be3a8de1c7a1d4d9712e30db343289e48d7b95 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 Jun 2021 18:11:10 +0100 Subject: [PATCH 3/3] docs: Mention the ::damage-event signal in the migration guide There is no replacement for damage event tracking. --- docs/reference/gtk/migrating-3to4.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index f286fc72dc..0ffe95a8b5 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -200,6 +200,9 @@ on a one-by-one basis: - If you were using `::map-event` and `::unmap-event` to track a window being mapped, you should use property notification for the [property@Gdk.Surface:mapped] property instead. + - The `::damage-event` signal has no replacement, as the only consumer + of damage events were the offscreen GDK surfaces, which have no + replacement in GTK 4.x. ### Set a proper application ID