Move window correctly

This commit is contained in:
Ian Douglas Scott 2021-08-24 15:13:42 -07:00
parent 2020885cce
commit 4886fe6d17

View file

@ -143,11 +143,5 @@ pub unsafe fn set_position(
y: c_int,
) {
// XXX check error return value
let hints = xlib::XAllocSizeHints();
let mut supplied: c_long = 0;
xlib::XGetWMNormalHints(display.xdisplay(), surface.xid(), hints, &mut supplied);
(*hints).x = x;
(*hints).y = y;
xlib::XSetWMNormalHints(display.xdisplay(), surface.xid(), hints);
xlib::XFree(hints as *mut _);
xlib::XMoveWindow(display.xdisplay(), surface.xid(), x, y);
}