gardesk/garclip / b996a5d

Browse files

use monitor_of_active_window for picker placement

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
b996a5ddd59d6106a114e6d277bcd8e0c2a79cc7
Parents
3b2ee0c
Tree
3d7d26c

1 changed file

StatusFile+-
M garclip-picker/src/app.rs 2 2
garclip-picker/src/app.rsmodified
@@ -53,8 +53,8 @@ impl App {
53
         // Connect to X11
53
         // Connect to X11
54
         let conn = Connection::connect(None)?;
54
         let conn = Connection::connect(None)?;
55
 
55
 
56
-        // Detect primary monitor for centering
56
+        // Detect monitor of active window (falls back to pointer position)
57
-        let monitor = gartk_x11::primary_monitor(&conn)?;
57
+        let monitor = gartk_x11::monitor_of_active_window(&conn)?;
58
 
58
 
59
         // Calculate popup size and position
59
         // Calculate popup size and position
60
         let width = 600;
60
         let width = 600;