git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@662 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-11 11:35:08 +00:00
parent a7fa520027
commit 8583f45cbf
3 changed files with 12 additions and 7 deletions

View File

@@ -798,10 +798,11 @@ void MwLLSetCursor(MwLL handle, MwCursor* image, MwCursor* mask) {
}
void MwLLDetach(MwLL handle, MwPoint* point) {
int x = 0, y = 0;
Window child, root, parent;
Window* children;
unsigned int nchild;
int x = 0, y = 0;
Window child, root, parent;
Window* children;
unsigned int nchild;
XWindowAttributes xwa;
handle->top = 1;
@@ -810,9 +811,13 @@ void MwLLDetach(MwLL handle, MwPoint* point) {
XTranslateCoordinates(handle->display, parent, RootWindow(handle->display, DefaultScreen(handle->display)), 0, 0, &x, &y, &child);
wait_unmap(handle);
XGetWindowAttributes(handle->display, handle->window, &xwa);
if(xwa.map_state == IsViewable) wait_unmap(handle);
XReparentWindow(handle->display, handle->window, RootWindow(handle->display, DefaultScreen(handle->display)), x + point->x, y + point->y);
if(xwa.map_state == IsViewable) wait_map(handle, 0, 0);
}
void MwLLShow(MwLL handle, int show) {