fix 'attempt to subtract with overflow' bug (#96)

* fix 'attempt to subtract with overflow' bug

* Little mistake
This commit is contained in:
Venceslas 2019-10-29 09:30:18 +01:00 committed by Daniel Collin
parent 24d2ce4a99
commit 5234be4283

View file

@ -274,8 +274,8 @@ impl Window {
attributes.backing_store = xlib::NotUseful;
let x = (d.screen_width - width) / 2;
let y = (d.screen_height - height) / 2;
let x = if d.screen_width > width { (d.screen_width - width) / 2 } else { 0 };
let y = if d.screen_height > height { (d.screen_height - height) / 2 } else { 0 };
let handle = (d.lib.XCreateWindow)(
d.display,