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 {
693
         // Flush to ensure ConfigureWindow requests are processed before we query geometry
693
         // Flush to ensure ConfigureWindow requests are processed before we query geometry
694
         self.conn.flush()?;
694
         self.conn.flush()?;
695
 
695
 
696
-        // Focus the new window if on a visible workspace
696
+        // Focus and raise the new window if on a visible workspace
697
         if target_visible {
697
         if target_visible {
698
             self.set_focus(window, true)?;
698
             self.set_focus(window, true)?;
699
+            self.raise_window(window)?;
699
         }
700
         }
700
 
701
 
701
         Ok(())
702
         Ok(())
@@ -2983,9 +2984,13 @@ impl WindowManager {
2983
         // Update stacking order in workspace's floating list
2984
         // Update stacking order in workspace's floating list
2984
         self.current_workspace_mut().raise_floating(window);
2985
         self.current_workspace_mut().raise_floating(window);
2985
 
2986
 
2986
-        // Raise in X11
2987
+        // Raise in X11 - if window has a frame, raise the frame instead
2987
         let aux = ConfigureWindowAux::new().stack_mode(StackMode::ABOVE);
2988
         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
+        }
2989
         self.conn.flush()?;
2994
         self.conn.flush()?;
2990
         Ok(())
2995
         Ok(())
2991
     }
2996
     }