fix bug
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@655 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
2f5539048b
commit
922f09b9d5
2 changed files with 15 additions and 1 deletions
|
|
@ -292,15 +292,30 @@ void MwLLSetXY(MwLL handle, int x, int y) {
|
|||
}
|
||||
|
||||
void MwLLSetWH(MwLL handle, int w, int h) {
|
||||
XSizeHints sh;
|
||||
long r;
|
||||
|
||||
XGetWMNormalHints(handle->display, handle->window, &sh, &r);
|
||||
|
||||
if(w < 2) w = 2;
|
||||
if(h < 2) h = 2;
|
||||
|
||||
sh.flags |= PSize;
|
||||
sh.width = w;
|
||||
sh.height = h;
|
||||
|
||||
XResizeWindow(handle->display, handle->window, w, h);
|
||||
XSetWMNormalHints(handle->display, handle->window, &sh);
|
||||
|
||||
destroy_pixmap(handle);
|
||||
create_pixmap(handle);
|
||||
|
||||
handle->width = w;
|
||||
handle->height = h;
|
||||
|
||||
XSync(handle->display, False);
|
||||
|
||||
MwLLForceRender(handle);
|
||||
}
|
||||
|
||||
void MwLLFreeColor(MwLLColor color) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue