Skip to content

Commit b14eba7

Browse files
committed
Fixed osd not displaying on scaled rotated outputs. Fixes: #135
1 parent b6b1ed4 commit b14eba7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/server/osd_window.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ impl SwayosdWindow {
6666
let update_margins = |window: &gtk::ApplicationWindow, monitor: &gdk::Monitor| {
6767
// Monitor scale factor is not always correct
6868
// Transform monitor height into coordinate system of window
69-
let mon_height =
70-
monitor.geometry().height() * monitor.scale_factor() / window.scale_factor();
69+
let mon_height = monitor.geometry().height() / window.scale_factor();
7170
// Calculate new margin
7271
let bottom = mon_height - window.allocated_height();
7372
let margin = (bottom as f32 * get_top_margin()).round() as i32;

0 commit comments

Comments
 (0)