aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-23 00:01:14 +0100
committerdec05eba <dec05eba@protonmail.com>2022-03-23 00:01:14 +0100
commite6e1d14c01150872fea9198328d862127b4896b6 (patch)
tree76661876cfb6c0124f31cf4d6080947cfedf41e7
parenteebe08956a6a7d6eab87b9a5341273644c5d4936 (diff)
Fix for bspwm
-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
};