summaryrefslogtreecommitdiff
path: root/src/winwidget.c
diff options
context:
space:
mode:
authorRichard Molitor <gattschardo@gmail.com>2015-11-14 23:53:02 +0100
committerRichard Molitor <gattschardo@gmail.com>2015-11-15 00:15:35 +0100
commitcbf5046f8de5b420c734903c7a4a46e9e3897293 (patch)
treeb48dc6a0359a285d2a0bfc3bed585a02d912cb48 /src/winwidget.c
parent0d064e95e689698047fdb7e695d357e7e158a9fb (diff)
events: also react to ConfigureNotify after mapping
Diffstat (limited to 'src/winwidget.c')
-rw-r--r--src/winwidget.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 8bf1dbb..7f0a0d9 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "filelist.h"
#include "winwidget.h"
#include "options.h"
+#include "events.h"
static void winwidget_unregister(winwidget win);
static void winwidget_register(winwidget win);
@@ -776,6 +777,15 @@ void winwidget_show(winwidget winwid)
/* wait for the window to map */
D(("Waiting for window to map\n"));
XMaskEvent(disp, StructureNotifyMask, &ev);
+ /* Unfortunately, StructureNotifyMask does not only mask
+ * the events of type MapNotify (which we want to mask here)
+ * but also such of type ConfigureNotify (and others, see
+ * https://tronche.com/gui/x/xlib/events/processing-overview.html),
+ * which should be handled, especially on tiling wm's. To
+ * remedy this, the handler is executed explicitly:
+ */
+ if (ev.type == ConfigureNotify)
+ feh_event_handle_ConfigureNotify(&ev);
D(("Window mapped\n"));
winwid->visible = 1;
}