aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp7
-rw-r--r--src/window_texture.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a22ebe7..e822c80 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1053,6 +1053,11 @@ bool CMainApplication::HandleInput()
}
if(src_window_id) {
+ if (XCheckTypedWindowEvent(x_display, src_window_id, VisibilityNotify, &xev)) {
+ window_resize_time = SDL_GetTicks();
+ window_resized = true;
+ }
+
if (XCheckTypedWindowEvent(x_display, src_window_id, ConfigureNotify, &xev) && xev.xconfigure.window == src_window_id) {
// Window resize
if(xev.xconfigure.width != window_width || xev.xconfigure.height != window_height) {
@@ -1089,7 +1094,7 @@ bool CMainApplication::HandleInput()
window_resize_time = SDL_GetTicks();
window_resized = false;
- XSelectInput(x_display, src_window_id, StructureNotifyMask|KeyPressMask|KeyReleaseMask);
+ XSelectInput(x_display, src_window_id, StructureNotifyMask|VisibilityChangeMask|KeyPressMask|KeyReleaseMask);
XFixesSelectCursorInput(x_display, src_window_id, XFixesDisplayCursorNotifyMask);
focused_window_changed = false;
diff --git a/src/window_texture.c b/src/window_texture.c
index 62a97dd..e162a25 100644
--- a/src/window_texture.c
+++ b/src/window_texture.c
@@ -70,8 +70,10 @@ int window_texture_on_resize(WindowTexture *self) {
GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT | GLX_WINDOW_BIT,
GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT,
/*GLX_BIND_TO_MIPMAP_TEXTURE_EXT, True,*/
- GLX_DOUBLEBUFFER, False,
- GLX_BUFFER_SIZE, 32,
+ GLX_BUFFER_SIZE, 24,
+ GLX_RED_SIZE, 8,
+ GLX_GREEN_SIZE, 8,
+ GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 0,
None
};