Hi,
Here is a patch for a bug I have on X11 : after DirectFB window is
obscured or moved out of the screen, its content are dirty until the
application updates the affected region.
In handle_expose, region->left_buffer_lock.buffer is always NULL,
so window contents are not redrawn after it has been obscured.
Calling dfb_surface_lock_buffer allows to set region->left_buffer_lock.
---
systems/x11/x11input.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/systems/x11/x11input.c b/systems/x11/x11input.c
index 39ab151..2e48994 100644
--- a/systems/x11/x11input.c
+++ b/systems/x11/x11input.c
@@ -490,13 +490,19 @@ handle_expose( const XExposeEvent *expose )
dfb_layer_region_lock( region );
/* Get the surface of the region. */
- if (region->surface && region->left_buffer_lock.buffer) {
- DFBRegion update = { expose->x, expose->y,
- expose->x + expose->width - 1,
- expose->y + expose->height - 1 };
+ if (region->surface) {
+ dfb_surface_lock_buffer( region->surface,
CSBR_FRONT, region->surface_accessor, CSAF_READ,
®ion->left_buffer_lock );
- funcs->UpdateRegion( layer, layer->driver_data,
layer->layer_data,
- region->region_data,
region->surface, &update, ®ion->left_buffer_lock, NULL, NULL );
+ if (region->left_buffer_lock.buffer) {
+ DFBRegion update = { expose->x, expose->y,
+ expose->x + expose->width - 1,
+ expose->y + expose->height - 1 };
+
+ funcs->UpdateRegion( layer,
layer->driver_data, layer->layer_data,
+ region->region_data,
region->surface, &update, ®ion->left_buffer_lock, NULL, NULL );
+ }
+
+ dfb_surface_unlock_buffer(region->surface,
®ion->left_buffer_lock );
}
/* Unlock the region. */
--
1.7.7.3
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev