Skip to content

Commit 5557594

Browse files
Adapt to addition of glib::Propagation
1 parent c0fbf6a commit 5557594

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/dialog/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use gtk::glib::{self, clone, ControlFlow};
1+
use gtk::glib::{self, clone};
22
use gtk::prelude::*;
33

44
use std::rc::Rc;
@@ -40,7 +40,7 @@ fn build_ui(application: &gtk::Application) {
4040
if let Some(application) = window.application() {
4141
application.remove_window(window);
4242
}
43-
ControlFlow::Break
43+
glib::Propagation::Proceed
4444
});
4545
}
4646

gdk4-x11/src/x11_display.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ impl X11Display {
6868
#[cfg(any(feature = "xlib", docsrs))]
6969
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
7070
#[doc(alias = "xevent")]
71-
pub unsafe fn connect_xevent<F: Fn(&Self, *mut xlib::XEvent) -> glib::ControlFlow + 'static>(
71+
pub unsafe fn connect_xevent<F: Fn(&Self, *mut xlib::XEvent) -> glib::Propagation + 'static>(
7272
&self,
7373
f: F,
7474
) -> SignalHandlerId {
7575
unsafe extern "C" fn xevent_trampoline<
76-
F: Fn(&X11Display, *mut xlib::XEvent) -> glib::ControlFlow + 'static,
76+
F: Fn(&X11Display, *mut xlib::XEvent) -> glib::Propagation + 'static,
7777
>(
7878
this: *mut ffi::GdkX11Display,
7979
xevent: glib::ffi::gpointer,

gtk4/src/event_controller_key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ use std::{boxed::Box as Box_, mem::transmute};
77

88
impl EventControllerKey {
99
pub fn connect_key_pressed<
10-
F: Fn(&EventControllerKey, Key, u32, gdk::ModifierType) -> glib::ControlFlow + 'static,
10+
F: Fn(&EventControllerKey, Key, u32, gdk::ModifierType) -> glib::Propagation + 'static,
1111
>(
1212
&self,
1313
f: F,
1414
) -> SignalHandlerId {
1515
unsafe extern "C" fn key_pressed_trampoline<
16-
F: Fn(&EventControllerKey, Key, u32, gdk::ModifierType) -> glib::ControlFlow + 'static,
16+
F: Fn(&EventControllerKey, Key, u32, gdk::ModifierType) -> glib::Propagation + 'static,
1717
>(
1818
this: *mut ffi::GtkEventControllerKey,
1919
keyval: libc::c_uint,

gtk4/src/subclass/window.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub trait WindowImpl: WindowImplExt + WidgetImpl {
2323
self.parent_enable_debugging(toggle)
2424
}
2525

26-
fn close_request(&self) -> glib::ControlFlow {
26+
fn close_request(&self) -> glib::Propagation {
2727
self.parent_close_request()
2828
}
2929
}
@@ -81,14 +81,14 @@ pub trait WindowImplExt: sealed::Sealed + ObjectSubclass {
8181
}
8282
}
8383

84-
fn parent_close_request(&self) -> glib::ControlFlow {
84+
fn parent_close_request(&self) -> glib::Propagation {
8585
unsafe {
8686
let data = Self::type_data();
8787
let parent_class = data.as_ref().parent_class() as *mut ffi::GtkWindowClass;
8888
let f = (*parent_class)
8989
.close_request
9090
.expect("No parent class impl for \"close_request\"");
91-
glib::ControlFlow::from_glib(f(self.obj().unsafe_cast_ref::<Window>().to_glib_none().0))
91+
glib::Propagation::from_glib(f(self.obj().unsafe_cast_ref::<Window>().to_glib_none().0))
9292
}
9393
}
9494
}

0 commit comments

Comments
 (0)