tony / oxwm

feat: Fullscreen mode implemntation Browse files
xsoder committed 2025-10-09 parent 2342897 commit 6b9ab97cb306cfb9e780c8ea0a0014ff9ea6b878
Showing 1 changed file with 1 additions and 7 deletions. UnifiedSplit
+1 −7 src/window_manager.rs
@@ -283,23 +283,17 @@ impl WindowManager {
283 283 fn toggle_fullscreen(&mut self) -> Result<()> {
284 284 if let Some(focused) = self.focused_window {
285 285 if self.fullscreen_window == Some(focused) {
286 - // Exit fullscreen
287 286 self.fullscreen_window = None;
288 287
289 - // Show bar
290 288 self.connection.map_window(self.bar.window())?;
291 289
292 - // Restore normal layout
293 290 self.apply_layout()?;
294 291 self.update_focus_visuals()?;
295 292 } else {
296 - // Enter fullscreen
297 293 self.fullscreen_window = Some(focused);
298 294
299 - // Hide bar
300 295 self.connection.unmap_window(self.bar.window())?;
301 296
302 - // Make window fill entire screen
303 297 let screen_width = self.screen.width_in_pixels as u32;
304 298 let screen_height = self.screen.height_in_pixels as u32;
305 299
@@ -311,7 +305,7 @@ impl WindowManager {
311 305 .width(screen_width)
312 306 .height(screen_height)
313 307 .border_width(0)
314 - .stack_mode(StackMode::ABOVE), // This raises the window
308 + .stack_mode(StackMode::ABOVE),
315 309 )?;
316 310
317 311 self.connection.flush()?;