forked from pyrite-dev/milsko
idk
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@700 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
95139469af
commit
e10fd1212c
1 changed files with 16 additions and 3 deletions
|
|
@ -210,6 +210,8 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
|
||||||
|
|
||||||
XSelectInput(r->x11.display, r->x11.window, mask);
|
XSelectInput(r->x11.display, r->x11.window, mask);
|
||||||
|
|
||||||
|
wait_map(r, 0, 0);
|
||||||
|
|
||||||
if(x != MwDEFAULT || y != MwDEFAULT) {
|
if(x != MwDEFAULT || y != MwDEFAULT) {
|
||||||
unsigned int dummy;
|
unsigned int dummy;
|
||||||
MwLLGetXYWH(r, &px, &py, &dummy, &dummy);
|
MwLLGetXYWH(r, &px, &py, &dummy, &dummy);
|
||||||
|
|
@ -218,11 +220,8 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
|
||||||
if(y == MwDEFAULT) y = py;
|
if(y == MwDEFAULT) y = py;
|
||||||
|
|
||||||
MwLLSetXY(r, x, y);
|
MwLLSetXY(r, x, y);
|
||||||
XSync(r->x11.display, False);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_map(r, 0, 0);
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -313,6 +312,7 @@ static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsign
|
||||||
static void MwLLSetXYImpl(MwLL handle, int x, int y) {
|
static void MwLLSetXYImpl(MwLL handle, int x, int y) {
|
||||||
XSizeHints sh;
|
XSizeHints sh;
|
||||||
long r;
|
long r;
|
||||||
|
XWindowChanges xwc;
|
||||||
|
|
||||||
sh.flags = 0;
|
sh.flags = 0;
|
||||||
XGetWMNormalHints(handle->x11.display, handle->x11.window, &sh, &r);
|
XGetWMNormalHints(handle->x11.display, handle->x11.window, &sh, &r);
|
||||||
|
|
@ -321,7 +321,13 @@ static void MwLLSetXYImpl(MwLL handle, int x, int y) {
|
||||||
sh.x = x;
|
sh.x = x;
|
||||||
sh.y = y;
|
sh.y = y;
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
xwc.x = x;
|
||||||
|
xwc.y = y;
|
||||||
|
XConfigureWindow(handle->x11.display, handle->x11.window, CWX | CWY, &xwc);
|
||||||
|
#else
|
||||||
XMoveWindow(handle->x11.display, handle->x11.window, x, y);
|
XMoveWindow(handle->x11.display, handle->x11.window, x, y);
|
||||||
|
#endif
|
||||||
XSetWMNormalHints(handle->x11.display, handle->x11.window, &sh);
|
XSetWMNormalHints(handle->x11.display, handle->x11.window, &sh);
|
||||||
|
|
||||||
XSync(handle->x11.display, False);
|
XSync(handle->x11.display, False);
|
||||||
|
|
@ -330,6 +336,7 @@ static void MwLLSetXYImpl(MwLL handle, int x, int y) {
|
||||||
static void MwLLSetWHImpl(MwLL handle, int w, int h) {
|
static void MwLLSetWHImpl(MwLL handle, int w, int h) {
|
||||||
XSizeHints sh;
|
XSizeHints sh;
|
||||||
long r;
|
long r;
|
||||||
|
XWindowChanges xwc;
|
||||||
|
|
||||||
sh.flags = 0;
|
sh.flags = 0;
|
||||||
XGetWMNormalHints(handle->x11.display, handle->x11.window, &sh, &r);
|
XGetWMNormalHints(handle->x11.display, handle->x11.window, &sh, &r);
|
||||||
|
|
@ -341,7 +348,13 @@ static void MwLLSetWHImpl(MwLL handle, int w, int h) {
|
||||||
sh.width = w;
|
sh.width = w;
|
||||||
sh.height = h;
|
sh.height = h;
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
xwc.width = w;
|
||||||
|
xwc.height = h;
|
||||||
|
XConfigureWindow(handle->x11.display, handle->x11.window, CWWidth | CWHeight, &xwc);
|
||||||
|
#else
|
||||||
XResizeWindow(handle->x11.display, handle->x11.window, w, h);
|
XResizeWindow(handle->x11.display, handle->x11.window, w, h);
|
||||||
|
#endif
|
||||||
XSetWMNormalHints(handle->x11.display, handle->x11.window, &sh);
|
XSetWMNormalHints(handle->x11.display, handle->x11.window, &sh);
|
||||||
|
|
||||||
destroy_pixmap(handle);
|
destroy_pixmap(handle);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue