aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Steeve <js@hipro.co.in>2012-08-29 03:07:00 +0530
committerRoss Burton <ross.burton@intel.com>2012-09-04 10:36:12 +0100
commit54904706e82049f1da34937e5b4ba2bbc498aa5d (patch)
treede9f6cab88ecb130fd9ac5497babb34774e40371
parentbd809d5f042d4af91bd812e36dd8a8eeb547de9d (diff)
downloadmatchbox-window-manager-2-54904706e82049f1da34937e5b4ba2bbc498aa5d.tar.gz
matchbox-window-manager-2-54904706e82049f1da34937e5b4ba2bbc498aa5d.tar.bz2
matchbox-window-manager-2-54904706e82049f1da34937e5b4ba2bbc498aa5d.zip
fix for issue:2583, disappearing windows
Added support to handle configure real by drawing only when needed in comp-manager. Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c6
-rw-r--r--matchbox/comp-mgr/mb-wm-comp-mgr-xrender.c27
-rw-r--r--matchbox/comp-mgr/mb-wm-comp-mgr.c5
-rw-r--r--matchbox/comp-mgr/mb-wm-comp-mgr.h6
-rw-r--r--matchbox/core/mb-window-manager.c9
-rw-r--r--matchbox/core/mb-wm-client-base.c3
6 files changed, 45 insertions, 11 deletions
diff --git a/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c b/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
index 0fd5472..21d728f 100644
--- a/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
+++ b/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
@@ -83,7 +83,8 @@ static void
mb_wm_comp_mgr_clutter_client_repair_real (MBWMCompMgrClient * client);
static void
-mb_wm_comp_mgr_clutter_client_configure_real (MBWMCompMgrClient * client);
+mb_wm_comp_mgr_clutter_client_configure_real (MBWMCompMgrClient * client,
+ MBWMGeometry * geometry);
static void
mb_wm_comp_mgr_clutter_client_class_init (MBWMObjectClass *klass)
@@ -772,7 +773,8 @@ mb_wm_comp_mgr_clutter_client_repair_real (MBWMCompMgrClient * client)
}
static void
-mb_wm_comp_mgr_clutter_client_configure_real (MBWMCompMgrClient * client)
+mb_wm_comp_mgr_clutter_client_configure_real (MBWMCompMgrClient * client,
+ MBWMGeometry * geometry)
{
MBWindowManagerClient * wm_client = client->wm_client;
MBWMCompMgrClutterClient * cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT (client);
diff --git a/matchbox/comp-mgr/mb-wm-comp-mgr-xrender.c b/matchbox/comp-mgr/mb-wm-comp-mgr-xrender.c
index fe7f75b..fccb0b0 100644
--- a/matchbox/comp-mgr/mb-wm-comp-mgr-xrender.c
+++ b/matchbox/comp-mgr/mb-wm-comp-mgr-xrender.c
@@ -60,7 +60,8 @@ static void
mb_wm_comp_mgr_xrender_client_repair_real (MBWMCompMgrClient * client);
static void
-mb_wm_comp_mgr_xrender_client_configure_real (MBWMCompMgrClient * client);
+mb_wm_comp_mgr_xrender_client_configure_real (MBWMCompMgrClient * client,
+ MBGeometry * geometry);
static void
mb_wm_comp_mgr_xrender_client_class_init (MBWMObjectClass *klass)
@@ -1314,7 +1315,8 @@ mb_wm_comp_mgr_xrender_client_repair_real (MBWMCompMgrClient * client)
}
static void
-mb_wm_comp_mgr_xrender_client_configure_real (MBWMCompMgrClient * client)
+mb_wm_comp_mgr_xrender_client_configure_real (MBWMCompMgrClient * client,
+ MBGeometry * geometry)
{
MBWMCompMgrDefaultClient * dclient = MB_WM_COMP_MGR_DEFAULT_CLIENT (client);
MBWindowManagerClient * wm_client = client->wm_client;
@@ -1322,15 +1324,34 @@ mb_wm_comp_mgr_xrender_client_configure_real (MBWMCompMgrClient * client)
MBWMCompMgr * mgr = wm->comp_mgr;
XserverRegion damage = None;
XserverRegion extents;
+ MBGeometry old_geom;
+ XRenderPictureAttributes pa;
extents = mb_wm_comp_mgr_xrender_client_extents (client);
- if (dclient->picture)
+ mb_wm_client_get_coverage (wm_client, &old_geom);
+ if ((dclient->picture) &&
+ ((old_geom.x != geometry->x) || (old_geom.y != geometry->y) ||
+ (old_geom.width != geometry->width) ||
+ (old_geom.height != geometry->height)))
{
XRenderFreePicture (wm->xdpy, dclient->picture);
dclient->picture = None;
}
+ if (!dclient->picture)
+ {
+ pa.subwindow_mode = IncludeInferiors;
+ dclient->picture = XRenderCreatePicture
+ (wm->xdpy,
+ wm_client->xwin_frame ?
+ wm_client->xwin_frame : wm_client->window->xwindow,
+ client->is_argb32 ?
+ XRenderFindStandardFormat (wm->xdpy, PictStandardARGB32)
+ : XRenderFindVisualFormat (wm->xdpy, wm_client->window->visual),
+ CPSubwindowMode, &pa);
+ }
+
damage = XFixesCreateRegion (wm->xdpy, 0, 0);
if (dclient->extents)
diff --git a/matchbox/comp-mgr/mb-wm-comp-mgr.c b/matchbox/comp-mgr/mb-wm-comp-mgr.c
index 68063c3..160303f 100644
--- a/matchbox/comp-mgr/mb-wm-comp-mgr.c
+++ b/matchbox/comp-mgr/mb-wm-comp-mgr.c
@@ -134,7 +134,8 @@ mb_wm_comp_mgr_client_show (MBWMCompMgrClient * client)
}
void
-mb_wm_comp_mgr_client_configure (MBWMCompMgrClient * client)
+mb_wm_comp_mgr_client_configure (MBWMCompMgrClient * client,
+ MBGeometry * geometry)
{
MBWMCompMgrClientClass *klass;
@@ -144,7 +145,7 @@ mb_wm_comp_mgr_client_configure (MBWMCompMgrClient * client)
klass = MB_WM_COMP_MGR_CLIENT_CLASS (MB_WM_OBJECT_GET_CLASS (client));
MBWM_ASSERT (klass->configure != NULL);
- klass->configure (client);
+ klass->configure (client, geometry);
}
void
diff --git a/matchbox/comp-mgr/mb-wm-comp-mgr.h b/matchbox/comp-mgr/mb-wm-comp-mgr.h
index 98e9cbd..35ac83d 100644
--- a/matchbox/comp-mgr/mb-wm-comp-mgr.h
+++ b/matchbox/comp-mgr/mb-wm-comp-mgr.h
@@ -22,6 +22,7 @@
#define _HAVE_MB_WM_COMP_MGR_H
#include <X11/extensions/Xdamage.h>
+#include <matchbox/core/mb-wm-types.h>
#define MB_WM_COMP_MGR(c) ((MBWMCompMgr*)(c))
#define MB_WM_COMP_MGR_CLASS(c) ((MBWMCompMgrClass*)(c))
@@ -137,7 +138,7 @@ struct MBWMCompMgrClientClass
void (*show) (MBWMCompMgrClient * client);
void (*hide) (MBWMCompMgrClient * client);
void (*repair) (MBWMCompMgrClient * client);
- void (*configure) (MBWMCompMgrClient * client);
+ void (*configure) (MBWMCompMgrClient * client, MBGeometry * geometry);
};
int
@@ -153,7 +154,8 @@ void
mb_wm_comp_mgr_client_repair (MBWMCompMgrClient * client);
void
-mb_wm_comp_mgr_client_configure (MBWMCompMgrClient * client);
+mb_wm_comp_mgr_client_configure (MBWMCompMgrClient * client,
+ MBGeometry * geometry);
#endif
diff --git a/matchbox/core/mb-window-manager.c b/matchbox/core/mb-window-manager.c
index 6e209ac..f6c2232 100644
--- a/matchbox/core/mb-window-manager.c
+++ b/matchbox/core/mb-window-manager.c
@@ -586,7 +586,14 @@ mb_wm_handle_composite_config_notify (XConfigureEvent *xev,
client = mb_wm_managed_client_from_frame (wm, xev->window);
if (client)
- mb_wm_comp_mgr_client_configure (client->cm_client);
+ {
+ MBGeometry new_geometry;
+ new_geometry.x = xev->x;
+ new_geometry.y = xev->y;
+ new_geometry.width = xev->width;
+ new_geometry.height = xev->height;
+ mb_wm_comp_mgr_client_configure (client->cm_client, &new_geometry);
+ }
}
return True;
}
diff --git a/matchbox/core/mb-wm-client-base.c b/matchbox/core/mb-wm-client-base.c
index 4dbf7a7..6460b22 100644
--- a/matchbox/core/mb-wm-client-base.c
+++ b/matchbox/core/mb-wm-client-base.c
@@ -413,7 +413,8 @@ move_resize_client_xwin (MBWindowManagerClient *client, int x, int y, int w, int
#if ENABLE_COMPOSITE
if (mb_wm_comp_mgr_enabled (wm->comp_mgr))
{
- mb_wm_comp_mgr_client_configure (client->cm_client);
+ mb_wm_comp_mgr_client_configure (client->cm_client,
+ &client->window->x_geometry);
}
#endif
}