@@ -974,6 +974,12 @@ impl WindowManager { |
| 974 | 974 | border_width as u16, |
| 975 | 975 | )?; |
| 976 | 976 | |
| 977 | + // Ensure tiled frame is below floating windows by stacking at bottom |
| 978 | + if let Some(frame) = self.frames.frame_for_client(*window) { |
| 979 | + let aux = ConfigureWindowAux::new().stack_mode(StackMode::BELOW); |
| 980 | + self.conn.conn.configure_window(frame, &aux)?; |
| 981 | + } |
| 982 | + |
| 977 | 983 | tracing::debug!( |
| 978 | 984 | "apply_layout: TILED+FRAME window={} at ({}, {}) size {}x{} (titlebar: {})", |
| 979 | 985 | window, gapped_x, gapped_y, final_width.max(1), final_height.max(1), titlebar_height |
@@ -992,6 +998,10 @@ impl WindowManager { |
| 992 | 998 | final_height.max(1), |
| 993 | 999 | border_width, |
| 994 | 1000 | )?; |
| 1001 | + |
| 1002 | + // Ensure tiled window is below floating windows |
| 1003 | + let aux = ConfigureWindowAux::new().stack_mode(StackMode::BELOW); |
| 1004 | + self.conn.conn.configure_window(*window, &aux)?; |
| 995 | 1005 | } |
| 996 | 1006 | |
| 997 | 1007 | // Store the actual geometry for pointer warping |
@@ -1034,18 +1044,17 @@ impl WindowManager { |
| 1034 | 1044 | if let Some(frame) = self.frames.frame_for_client(window_id) { |
| 1035 | 1045 | let aux = ConfigureWindowAux::new().stack_mode(StackMode::ABOVE); |
| 1036 | 1046 | self.conn.conn.configure_window(frame, &aux)?; |
| 1047 | + tracing::info!( |
| 1048 | + "apply_layout: FLOATING+FRAME window={} frame={} raised ABOVE (at ({}, {}) size {}x{})", |
| 1049 | + window_id, frame, geom.x, geom.y, adjusted_width.max(1), adjusted_height.max(1) |
| 1050 | + ); |
| 1051 | + } else { |
| 1052 | + tracing::warn!( |
| 1053 | + "apply_layout: FLOATING window={} has_frame=true but no frame found!", |
| 1054 | + window_id |
| 1055 | + ); |
| 1037 | 1056 | } |
| 1038 | | - |
| 1039 | | - tracing::debug!( |
| 1040 | | - "apply_layout: FLOATING+FRAME window={} at ({}, {}) size {}x{} (raising)", |
| 1041 | | - window_id, geom.x, geom.y, adjusted_width.max(1), adjusted_height.max(1) |
| 1042 | | - ); |
| 1043 | 1057 | } else { |
| 1044 | | - tracing::debug!( |
| 1045 | | - "apply_layout: FLOATING window={} at ({}, {}) size {}x{} (raising)", |
| 1046 | | - window_id, geom.x, geom.y, adjusted_width.max(1), adjusted_height.max(1) |
| 1047 | | - ); |
| 1048 | | - |
| 1049 | 1058 | // Configure geometry |
| 1050 | 1059 | self.conn.configure_window( |
| 1051 | 1060 | window_id, |
@@ -1059,6 +1068,11 @@ impl WindowManager { |
| 1059 | 1068 | // Raise to top of stack (each subsequent window goes above the previous) |
| 1060 | 1069 | let aux = ConfigureWindowAux::new().stack_mode(StackMode::ABOVE); |
| 1061 | 1070 | self.conn.conn.configure_window(window_id, &aux)?; |
| 1071 | + |
| 1072 | + tracing::info!( |
| 1073 | + "apply_layout: FLOATING window={} raised ABOVE (at ({}, {}) size {}x{})", |
| 1074 | + window_id, geom.x, geom.y, adjusted_width.max(1), adjusted_height.max(1) |
| 1075 | + ); |
| 1062 | 1076 | } |
| 1063 | 1077 | |
| 1064 | 1078 | // Store the actual geometry for pointer warping |