Created attachment 566 [details] patch for disappearing windows issue in matchbox Note: We are not using 'sato'. We are using the matchbox-window-manager-2 in our custom image. We are using the 'Xrender' compositing manager. The main window opens a dialog-box-1. dialog-box-1 opens up another dialog-box-2. When opening dialog-box-2, if something had changed in the underlying windows causing the ConfigureNotify to be emitted, the underlying windows are hidden away by matchbox. The window stack looks like this: ==== window stack ===== +-- XID: 4008ef NAME: Alpha keyboard, type 2, layer 0 +-- XID: 4006c9 NAME: Login, type 2, layer 0 XID: 400003 NAME: hmi-ui, type 1, layer 3 ====================== The attached patch fixes this problem.
I'm somewhat impressed that people are using mb-wm-2...
@ross: Is there a better wm for a "single-application with compositing coolness" usecase?
I don't think that is correct, it likely only works for you because the ConfigureNotify in this case is for stacking change without change to the window geometry. I think mb_wm_comp_mgr_xrender_client_configure_real() needs to check whether the window size has changed; if it has not, the function can short-circuit out, leaving the existing picture alone. If the size has changed, the picture needs to be release *and* recreated (at the moment the picture creation only happens in the _show() method, which is why this does not work).
@tf: Okay. I am a noob to X11. I just traced the execution to see where it was getting screwed. Any pointers on where the original geometry and the new geometry would be?
Looks like the new geometry comes along with the ConfigureNotify event. But this is not propagated beyond 'mb_wm_handle_composite_config_notify' in core/mb-window-manager.c. - Should we propagate this event up to the xrender composite-manager, and check for geometry change there? - Or, should we just check for it in the window-manager.c and not call the comp-manager when there is no geometry change?
Created attachment 581 [details] fix for disappearing windows (take-2)
I have attached another patch. This time, I check if geometry has changed before calling the composite-manager's configure_notify handler. Please check and comment.
Created attachment 582 [details] fix for disappearing windows (take-3) Fixed a small bug with the previous patch.
The issue shows up again when the dialog box's geometry changes. When a ChangeNotify is raised, the dclient->picture is destroyed but never created again.
Created attachment 591 [details] fix for disappearing windows (take-4) This patch drops the dclient->picture and creates it with the changed window when ChangeNotify is raised.
@tf: Please can you have a look at the patch and tell me whether its correct?
(In reply to comment #11) > @tf: Please can you have a look at the patch and tell me whether its correct? the configure_real function really should check whether the window extents/position have changed to avoid doing this unnecessarily. As is, you can get at the bounding box with XFixesFetchRegionAndBounds(), though it would make sense if the configuration geometry was getting passed down into the compositor configure function so it can be compared to old values cached in the MBWMCompMgrDefaultClient struct. (MBWM2 has been more or less unmaintained for 4 years ever since Intel acquired the codebase, and I have not got the spare time to take it on at the moment but our company, sleep(5) ltd, could provide support and further development on commercial basis for anyone needing that.)
Created attachment 745 [details] fix for disappearing windows (take-5)
@tf I've attached another patch implementing your suggestions. In this one, the geometry is pushed upto the *configure_real. The *configure_real redraws only when the geometry is changed.
Changed the milestone as this is not really part of the Yocto Project release. 'Future' is not exactly right either, but we don't seem to have a n/a value for target milestone. Thanks for letting me know, Ross!
Comment on attachment 745 [details] fix for disappearing windows (take-5) This looks good to me.
Thanks Tomas, much appreciated. Merged to master
tf & Ross Burton, thanks guys.