@@ -31,19 +31,6 @@ use iced_futures::{
3131 } ,
3232 Executor , Runtime , Subscription ,
3333} ;
34- // use iced_native::{
35- // application::{self, StyleSheet},
36- // clipboard,
37- // command::platform_specific::{
38- // self,
39- // wayland::{data_device::DndIcon, popup},
40- // },
41- // event::Status,
42- // layout::Limits,
43- // mouse::{self, Interaction},
44- // widget::{operation::{self, focusable::{focus, find_focused}}, Tree, self},
45- // Element, Renderer, Widget,
46- // };
4734use log:: error;
4835
4936use sctk:: {
@@ -60,10 +47,6 @@ use iced_graphics::{
6047 // Color, Point, Viewport,
6148 Viewport ,
6249} ;
63- // use iced_native::user_interface::{self, UserInterface};
64- // use iced_native::window::Id as SurfaceId;
65- use itertools:: Itertools ;
66- // use iced_native::widget::Operation;
6750use iced_runtime:: {
6851 clipboard,
6952 command:: {
@@ -79,12 +62,12 @@ use iced_runtime::{
7962 Command , Debug , Program , UserInterface ,
8063} ;
8164use iced_style:: application:: { self , StyleSheet } ;
65+ use itertools:: Itertools ;
8266use raw_window_handle:: {
8367 HasRawDisplayHandle , HasRawWindowHandle , RawDisplayHandle , RawWindowHandle ,
8468 WaylandDisplayHandle , WaylandWindowHandle ,
8569} ;
8670use std:: mem:: ManuallyDrop ;
87- // use iced_native::widget::operation::OperationWrapper;
8871
8972pub enum Event < Message > {
9073 /// A normal sctk event
@@ -963,6 +946,18 @@ where
963946 None => continue ,
964947 } ;
965948 state. set_logical_size ( w as f64 , h as f64 ) ;
949+ match surface_id {
950+ SurfaceIdWrapper :: Window ( id) => {
951+ ev_proxy. send_event ( Event :: Window (
952+ platform_specific:: wayland:: window:: Action :: Size {
953+ id : * id,
954+ width : w,
955+ height : h,
956+ } ,
957+ ) ) ;
958+ }
959+ _ => { }
960+ } ;
966961 }
967962 auto_size_surfaces
968963 . insert ( * surface_id, ( w, h, limits, false ) ) ;
0 commit comments