File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ impl Window {
206206 let window_info = WindowInfo :: from_logical_size ( options. size , scaling) ;
207207
208208 let window_id = xcb_connection. conn . generate_id ( ) ;
209- xcb:: create_window (
209+ xcb:: create_window_checked (
210210 & xcb_connection. conn ,
211211 xcb:: COPY_FROM_PARENT as u8 ,
212212 window_id,
@@ -217,7 +217,7 @@ impl Window {
217217 window_info. physical_size ( ) . height as u16 , // window height
218218 0 , // window border
219219 xcb:: WINDOW_CLASS_INPUT_OUTPUT as u16 ,
220- screen. root_visual ( ) ,
220+ if parent . is_some ( ) { xcb :: COPY_FROM_PARENT as u32 } else { screen. root_visual ( ) } ,
221221 & [ (
222222 xcb:: CW_EVENT_MASK ,
223223 xcb:: EVENT_MASK_EXPOSURE
@@ -228,7 +228,7 @@ impl Window {
228228 | xcb:: EVENT_MASK_KEY_RELEASE
229229 | xcb:: EVENT_MASK_STRUCTURE_NOTIFY ,
230230 ) ] ,
231- ) ;
231+ ) . request_check ( ) . unwrap ( ) ;
232232
233233 xcb:: map_window ( & xcb_connection. conn , window_id) ;
234234
You can’t perform that action at this time.
0 commit comments