gardesk/gardisplay / 139af1d

Browse files

add debug logging for RandR output detection

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
139af1d2b58e26952a665fe7c725bb5b74230b4e
Parents
40f1b37
Tree
0ea62e7

1 changed file

StatusFile+-
M gardisplay/src/app.rs 16 0
gardisplay/src/app.rsmodified
@@ -130,6 +130,16 @@ impl App {
130130
             match RandrManager::new(conn.clone()) {
131131
                 Ok(r) => {
132132
                     let outputs = r.get_outputs().unwrap_or_default();
133
+                    tracing::debug!("RandR: found {} outputs", outputs.len());
134
+                    for o in &outputs {
135
+                        tracing::debug!(
136
+                            "  {} connected={} modes={} current={:?}",
137
+                            o.name,
138
+                            o.connected,
139
+                            o.modes.len(),
140
+                            o.current_mode.as_ref().map(|m| format!("{}x{}@{:.0}Hz", m.width, m.height, m.refresh))
141
+                        );
142
+                    }
133143
                     (Some(r), outputs)
134144
                 }
135145
                 Err(e) => {
@@ -547,6 +557,12 @@ impl App {
547557
         if let Some(state) = self.monitor_view.selected_monitor() {
548558
             // Find matching RandR output (may be None in demo mode)
549559
             let output = self.randr_outputs.iter().find(|o| o.name == state.info.name);
560
+            tracing::debug!(
561
+                "sync_panel_selection: monitor={} output_found={} modes={}",
562
+                state.info.name,
563
+                output.is_some(),
564
+                output.map(|o| o.modes.len()).unwrap_or(0)
565
+            );
550566
 
551567
             self.display_panel.set_selected_monitor(
552568
                 Some(&state.info.name),