mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-15 13:53:28 +00:00
fix
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@662 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -40,7 +40,7 @@ MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsi
|
||||
|
||||
p.x = (ww - w) / 2;
|
||||
p.y = (wh - h) / 2;
|
||||
window = MwVaCreateWidget(MwWindowClass, "messagebox", handle, p.x, p.y, w, h,
|
||||
window = MwVaCreateWidget(MwWindowClass, "messagebox", handle, 0, 0, w, h,
|
||||
MwNtitle, title,
|
||||
NULL);
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ static void destroy(MwWidget handle) {
|
||||
in_area = (r.x <= handle->mouse_point.x && r.y <= handle->mouse_point.y && handle->mouse_point.x <= (int)(r.x + r.width) && handle->mouse_point.y <= (int)(r.y + r.height)) ? 1 : 0;
|
||||
|
||||
#define END_MENU_LOOP \
|
||||
p.x += tw / 2 + 20; \
|
||||
p.x += tw / 2 + 30; \
|
||||
if(incr) p.x = oldx; \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user