fix: fixing more gtk4 related err
This commit is contained in:
@@ -206,7 +206,7 @@ mod platform_x11 {
|
||||
|
||||
let gdk_surface = window.surface()?;
|
||||
|
||||
let x11_surface = gdk_surface.downcast::<X11Surface>().ok()?;
|
||||
let x11_surface = gdk_surface.downcast::<gdk4_x11::X11Surface>().ok()?;
|
||||
|
||||
match window_init.stacking {
|
||||
WindowStacking::Foreground => x11_surface.set_keep_above(true),
|
||||
|
||||
@@ -82,7 +82,7 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||
connect_monitor_added(ui_send.clone());
|
||||
|
||||
// initialize all the handlers and tasks running asyncronously
|
||||
let tokio_handle = init_async_part(paths.clone(), ui_send);
|
||||
let tokio_handle = init_async_part(paths.clone(), ui_send.clone());
|
||||
|
||||
// allow the GTK main thread to do tokio things
|
||||
let _g = tokio_handle.enter();
|
||||
@@ -105,7 +105,7 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||
};
|
||||
|
||||
if let Some(display) = gtk4::gdk::Display::default() {
|
||||
StyleContext::add_provider_for_display(
|
||||
gtk4::StyleContext::add_provider_for_display(
|
||||
&display,
|
||||
&app.css_provider,
|
||||
gtk4::STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
|
||||
@@ -7,7 +7,8 @@ use gdk::{ModifierType, NotifyType};
|
||||
use gtk4::glib::translate::FromGlib;
|
||||
use gtk4::{self, prelude::*};
|
||||
use gtk4::{gdk, glib, pango};
|
||||
use gtk4::{EventControllerLegacy, EventControllerMotion, EventControllerScroll, EventControllerKey, GestureClick};
|
||||
use gtk4::{EventControllerLegacy, EventControllerMotion, EventControllerScroll, EventControllerKey, GestureClick, DropTarget};
|
||||
use gtk4::glib::Type;
|
||||
use rhai::Map;
|
||||
use rhai_impl::ast::{get_id_to_widget_info, hash_props_and_type, WidgetNode};
|
||||
|
||||
@@ -1209,7 +1210,7 @@ pub(super) fn build_gtk_button(
|
||||
gtk4::glib::Propagation::Proceed
|
||||
});
|
||||
|
||||
key_controller.connect_key_released(move |_, code, _, _| {
|
||||
key_controller.connect_key_released(move |_, _, code, _| {
|
||||
let controller = controller_data.borrow();
|
||||
match code {
|
||||
// return
|
||||
|
||||
Reference in New Issue
Block a user