Skip to content

Commit

Permalink
refactor: avoid small redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
ndavd committed Jan 3, 2024
1 parent 0885df8 commit 0402ee7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ fn realize(win: &ApplicationWindow, width: i32, bottom: i32) {
let gdk_win = win.window().unwrap();
gdk_win.set_override_redirect(true);

let monitor_geometry = gdk_win
.screen()
.display()
.primary_monitor()
.unwrap()
.geometry();
let monitor_geometry = gdk_win.display().primary_monitor().unwrap().geometry();

win.move_(
monitor_geometry.width() / 2 - width / 2,
Expand Down

0 comments on commit 0402ee7

Please sign in to comment.