@@ -266,20 +266,20 @@ pub fn setDisplayMode(x11: *const Native, display_mode: DisplayMode, border: boo
266266 @ptrCast (atoms .slice ()),
267267 @intCast (atoms .len ),
268268 );
269- x11 . setFullscreen (false );
270- x11 . setDecorated (border );
271- x11 . setFloating (false );
269+ setFullscreen (x11 , false );
270+ setDecorated (x11 , border );
271+ setFloating (x11 , false );
272272 _ = libx11 .? .XMapWindow (x11 .display , x11 .window );
273273 _ = libx11 .? .XFlush (x11 .display );
274274 },
275275 .fullscreen = > {
276- x11 . setFullscreen (true );
276+ setFullscreen (x11 , true );
277277 _ = libx11 .? .XFlush (x11 .display );
278278 },
279279 .fullscreen_borderless = > {
280- x11 . setDecorated (false );
281- x11 . setFloating (true );
282- x11 . setFullscreen (false );
280+ setDecorated (x11 , false );
281+ setFloating (x11 , true );
282+ setFullscreen (x11 , false );
283283 _ = libx11 .? .XResizeWindow (
284284 x11 .display ,
285285 x11 .window ,
@@ -294,7 +294,7 @@ pub fn setDisplayMode(x11: *const Native, display_mode: DisplayMode, border: boo
294294fn setFullscreen (x11 : * const Native , enabled : bool ) void {
295295 const wm_state = libx11 .? .XInternAtom (x11 .display , "_NET_WM_STATE" , c .False );
296296 const wm_fullscreen = libx11 .? .XInternAtom (x11 .display , "_NET_WM_STATE_FULLSCREEN" , c .False );
297- x11 . sendEventToWM (wm_state , &.{ @intFromBool (enabled ), @intCast (wm_fullscreen ), 0 , 1 });
297+ sendEventToWM (x11 , wm_state , &.{ @intFromBool (enabled ), @intCast (wm_fullscreen ), 0 , 1 });
298298 // Force composition OFF to reduce overhead
299299 const compositing_disable_on : c_long = @intFromBool (enabled );
300300 const bypass_compositor = libx11 .? .XInternAtom (x11 .display , "_NET_WM_BYPASS_COMPOSITOR" , c .False );
@@ -318,7 +318,7 @@ fn setFloating(x11: *const Native, enabled: bool) void {
318318 const net_wm_state_remove = 0 ;
319319 const net_wm_state_add = 1 ;
320320 const action : c_long = if (enabled ) net_wm_state_add else net_wm_state_remove ;
321- x11 . sendEventToWM (wm_state , &.{ action , @intCast (wm_above ), 0 , 1 });
321+ sendEventToWM (x11 , wm_state , &.{ action , @intCast (wm_above ), 0 , 1 });
322322}
323323
324324fn sendEventToWM (x11 : * const Native , message_type : c.Atom , data : []const c_long ) void {
@@ -703,9 +703,6 @@ fn processEvent(window_id: mach.ObjectID, event: *c.XEvent) void {
703703 core_window .width = @intCast (event .xconfigure .width );
704704 core_window .height = @intCast (event .xconfigure .height );
705705
706- // FIX: What is the Mach Object System way of doing this?
707- // core_ptr.swap_chain_update.set();
708-
709706 core_ptr .pushEvent (.{
710707 .window_resize = .{
711708 .size = Core.Size {
0 commit comments