fix
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@662 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
a7fa520027
commit
8583f45cbf
3 changed files with 12 additions and 7 deletions
|
|
@ -798,10 +798,11 @@ void MwLLSetCursor(MwLL handle, MwCursor* image, MwCursor* mask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MwLLDetach(MwLL handle, MwPoint* point) {
|
void MwLLDetach(MwLL handle, MwPoint* point) {
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
Window child, root, parent;
|
Window child, root, parent;
|
||||||
Window* children;
|
Window* children;
|
||||||
unsigned int nchild;
|
unsigned int nchild;
|
||||||
|
XWindowAttributes xwa;
|
||||||
|
|
||||||
handle->top = 1;
|
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);
|
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);
|
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) {
|
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.x = (ww - w) / 2;
|
||||||
p.y = (wh - h) / 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,
|
MwNtitle, title,
|
||||||
NULL);
|
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;
|
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 \
|
#define END_MENU_LOOP \
|
||||||
p.x += tw / 2 + 20; \
|
p.x += tw / 2 + 30; \
|
||||||
if(incr) p.x = oldx; \
|
if(incr) p.x = oldx; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue