fvwm2/fvwm-icon-440d675d14412ec0a123d4c977534ab688229148.patch

81 lines
2.3 KiB
Diff
Raw Normal View History

2016-08-08 14:44:57 +02:00
From 65bfccfd9ed0cac95088d612fdcdf3edf4c3b23d Mon Sep 17 00:00:00 2001
From: Thomas Adam <thomas@fvwm.org>
Date: Thu, 4 Aug 2016 11:38:52 +0100
Subject: [PATCH] Expose: don't flush accumulated events
When dealing with Expose events, don't ever flush the accumulated ones; the
handling of the queue here is incorrect, and ultimately gets addressed during
other operations.
This should help fix the problem of ParentRelative icon pixmaps from
corrupting other icons, etc.
---
fvwm/events.c | 13 +------------
fvwm/icons.c | 15 ++++-----------
fvwm/menus.c | 1 -
3 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/fvwm/events.c b/fvwm/events.c
index 3ea69bb..1d5bb64 100644
--- a/fvwm/events.c
+++ b/fvwm/events.c
@@ -2412,18 +2412,7 @@ void HandleExpose(const evh_args_t *ea)
FvwmWindow * const fw = ea->exc->w.fw;
e = *ea->exc->x.etrigger;
-#if 0
- /* This doesn't work well. Sometimes, the expose count is zero although
- * dozens of expose events are pending. This happens all the time
- * during a shading animation. Simply flush expose events
- * unconditionally. */
- if (e.xexpose.count != 0)
- {
- flush_accumulate_expose(e.xexpose.window, &e);
- }
-#else
- flush_accumulate_expose(e.xexpose.window, &e);
-#endif
+
if (fw == NULL)
{
return;
diff --git a/fvwm/icons.c b/fvwm/icons.c
index a58a019..d23f08d 100644
--- a/fvwm/icons.c
+++ b/fvwm/icons.c
@@ -1366,18 +1366,11 @@ void DrawIconWindow(
if (draw_title && FW_W_ICON_TITLE(fw) != None)
{
- if (pev && pev->xexpose.window != FW_W_ICON_TITLE(fw))
+ if (pev && pev->xexpose.window == FW_W_ICON_TITLE(fw))
{
- XEvent e;
- if (FCheckTypedWindowEvent(
- dpy, FW_W_ICON_TITLE(fw), Expose, &e))
- {
- flush_accumulate_expose(
- FW_W_ICON_TITLE(fw), &e);
- DrawIconTitleWindow(
- fw, &e, BackColor, Shadow, Relief, cs,
- title_cs);
- }
+ DrawIconTitleWindow(
+ fw, pev, BackColor, Shadow, Relief, cs,
+ title_cs);
}
else
{
diff --git a/fvwm/menus.c b/fvwm/menus.c
index 885eada..2c49195 100644
--- a/fvwm/menus.c
+++ b/fvwm/menus.c
@@ -6239,7 +6239,6 @@ Bool menu_expose(XEvent *event, FvwmWindow *fw)
dpy, event->xany.window, MenuContext, (caddr_t *)&mr) !=
XCNOENT))
{
- flush_accumulate_expose(event->xany.window, event);
paint_menu(mr, event, fw);
return True;