useless feature

This commit is contained in:
Eduardo Bart 2011-03-25 16:57:11 -03:00
parent 8a13517714
commit 33a2b885b5
1 changed files with 18 additions and 11 deletions

View File

@ -297,20 +297,27 @@ void Platform::poll()
switch(event.type) { switch(event.type) {
case ConfigureNotify: case ConfigureNotify:
// window resize // window resize
if(x11.width != event.xconfigure.width || x11.height != event.xconfigure.height) { static int oldWidth = -1;
x11.width = event.xconfigure.width; static int oldHeight = -1;
x11.height = event.xconfigure.height; if(oldWidth != event.xconfigure.width || oldHeight != event.xconfigure.height) {
g_engine.onResize(x11.width, x11.height); g_engine.onResize(event.xconfigure.width, event.xconfigure.height);
oldWidth = event.xconfigure.width;
oldHeight = event.xconfigure.height;
} }
// hack to fix x11 windows move gaps if(!isWindowMaximized()) {
static int gap_x = -1, gap_y = -1; x11.width = event.xconfigure.width;
if(gap_x == -1 && gap_y == -1) { x11.height = event.xconfigure.height;
gap_x = event.xconfigure.x;
gap_y = event.xconfigure.y; // hack to fix x11 windows move gaps
static int gap_x = -1, gap_y = -1;
if(gap_x == -1 && gap_y == -1) {
gap_x = event.xconfigure.x;
gap_y = event.xconfigure.y;
}
x11.x = event.xconfigure.x - gap_x;
x11.y = event.xconfigure.y - gap_y;
} }
x11.x = event.xconfigure.x - gap_x;
x11.y = event.xconfigure.y - gap_y;
break; break;
case KeyPress: case KeyPress: