Move window correctly
This commit is contained in:
parent
2020885cce
commit
4886fe6d17
1 changed files with 1 additions and 7 deletions
8
src/x.rs
8
src/x.rs
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue