gardesk/gar / 73a9223

Browse files

fix dialog windows spawning behind tiled windows

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
73a9223be3e561b728de8810c306af9791cef128
Parents
b44d141
Tree
efaf440

1 changed file

StatusFile+-
M gar/src/x11/events.rs 8 3
gar/src/x11/events.rsmodified
@@ -693,9 +693,10 @@ impl WindowManager {
693693
         // Flush to ensure ConfigureWindow requests are processed before we query geometry
694694
         self.conn.flush()?;
695695
 
696
-        // Focus the new window if on a visible workspace
696
+        // Focus and raise the new window if on a visible workspace
697697
         if target_visible {
698698
             self.set_focus(window, true)?;
699
+            self.raise_window(window)?;
699700
         }
700701
 
701702
         Ok(())
@@ -2983,9 +2984,13 @@ impl WindowManager {
29832984
         // Update stacking order in workspace's floating list
29842985
         self.current_workspace_mut().raise_floating(window);
29852986
 
2986
-        // Raise in X11
2987
+        // Raise in X11 - if window has a frame, raise the frame instead
29872988
         let aux = ConfigureWindowAux::new().stack_mode(StackMode::ABOVE);
2988
-        self.conn.conn.configure_window(window, &aux)?;
2989
+        if let Some(frame) = self.frames.frame_for_client(window) {
2990
+            self.conn.conn.configure_window(frame, &aux)?;
2991
+        } else {
2992
+            self.conn.conn.configure_window(window, &aux)?;
2993
+        }
29892994
         self.conn.flush()?;
29902995
         Ok(())
29912996
     }