[shotwell/wip/gtk4: 80/94] Listen to size changes of toplevel window
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/gtk4: 80/94] Listen to size changes of toplevel window
- Date: Thu, 28 Jul 2022 21:57:36 +0000 (UTC)
commit ad598d77c954ccea1c6ffb29788d06348962e340
Author: Jens Georg <mail jensge org>
Date: Wed Apr 20 14:40:45 2022 +0200
Listen to size changes of toplevel window
src/CheckerboardPage.vala | 6 ++++++
src/Page.vala | 9 ---------
2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/CheckerboardPage.vala b/src/CheckerboardPage.vala
index 6ed2edd0..66bcd86b 100644
--- a/src/CheckerboardPage.vala
+++ b/src/CheckerboardPage.vala
@@ -76,6 +76,12 @@ public abstract class CheckerboardPage : Page {
add_controller (key_controller);
}
+ protected override bool on_configure(Gdk.Rectangle rect) {
+ layout.on_viewport_resized();
+
+ return false;
+ }
+
public void init_item_context_menu(string path) {
item_context_menu_path = path;
}
diff --git a/src/Page.vala b/src/Page.vala
index 48f3485d..cf496c21 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -200,15 +200,6 @@ public abstract class Page : Gtk.Box {
| Gtk.EventControllerScrollFlags.DISCRETE);
scroll.scroll.connect(on_mousewheel_internal);
event_source.add_controller(scroll);
-
-#if 0
- // interested in mouse button and motion events on the event source
- event_source.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK
- | Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.POINTER_MOTION_HINT_MASK
- | Gdk.EventMask.BUTTON_MOTION_MASK | Gdk.EventMask.LEAVE_NOTIFY_MASK
- | Gdk.EventMask.SCROLL_MASK | Gdk.EventMask.SMOOTH_SCROLL_MASK);
- event_source.realize.connect(on_event_source_realize);
- #endif
}
private void detach_event_source() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]