mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
[ClutterStageX11] Remove the handling_configure flag
Since Clutter changed to using a layout scheme the handling_configure flag no longer works because the allocate method is not invoked immediately during the call to set_size from the ConfigureNotify handler. However it is also no longer neccessary because the resizes are effectively batched up until a relayout is run so it won't cause an infinite loop of resize and notify events anyway.
This commit is contained in:
parent
1cac3d91f9
commit
d454bfcc87
@ -427,12 +427,6 @@ event_translate (ClutterBackend *backend,
|
||||
case ConfigureNotify:
|
||||
if (!stage_x11->is_foreign_xwin)
|
||||
{
|
||||
/* Set a flag so that the stage will know the actor is being
|
||||
resized in response to the window size changing as
|
||||
opposed to a request from the application. This prevents
|
||||
it from trying to resize the window again */
|
||||
stage_x11->handling_configure = TRUE;
|
||||
|
||||
CLUTTER_NOTE (BACKEND, "%s: ConfigureNotify[%x] (%d, %d)",
|
||||
G_STRLOC,
|
||||
(unsigned int) stage_x11->xwin,
|
||||
@ -443,8 +437,6 @@ event_translate (ClutterBackend *backend,
|
||||
xevent->xconfigure.width,
|
||||
xevent->xconfigure.height);
|
||||
|
||||
stage_x11->handling_configure = FALSE;
|
||||
|
||||
/* the resize process is complete, so we can ask the stage
|
||||
* to set up the GL viewport with the new size
|
||||
*/
|
||||
|
@ -270,21 +270,8 @@ clutter_stage_x11_allocate (ClutterActor *self,
|
||||
stage_x11->xwin_width = new_width;
|
||||
stage_x11->xwin_height = new_height;
|
||||
|
||||
/* The 'handling_configure' flag below is used to prevent the
|
||||
window from being resized again in response to a
|
||||
ConfigureNotify event. Normally this will not be a problem
|
||||
because the window will be resized to xwin_width and
|
||||
xwin_height so the above test will prevent it from resizing
|
||||
the window a second time. However if the stage is resized
|
||||
multiple times without the events being processed in between
|
||||
(eg, when calling g_object_set to set both width and height)
|
||||
then there will be multiple ConfigureNotify events in the
|
||||
queue. Handling the first event will undo the work of setting
|
||||
the second property which will cause it to keep generating
|
||||
events in an infinite loop. See bug #810 */
|
||||
if (stage_x11->xwin != None &&
|
||||
!stage_x11->is_foreign_xwin &&
|
||||
!stage_x11->handling_configure)
|
||||
!stage_x11->is_foreign_xwin)
|
||||
{
|
||||
CLUTTER_NOTE (BACKEND, "%s: XResizeWindow[%x] (%d, %d)",
|
||||
G_STRLOC,
|
||||
@ -577,7 +564,6 @@ clutter_stage_x11_init (ClutterStageX11 *stage)
|
||||
|
||||
stage->is_foreign_xwin = FALSE;
|
||||
stage->fullscreen_on_map = FALSE;
|
||||
stage->handling_configure = FALSE;
|
||||
stage->is_cursor_visible = TRUE;
|
||||
|
||||
stage->title = NULL;
|
||||
|
@ -47,7 +47,6 @@ struct _ClutterStageX11
|
||||
|
||||
guint is_foreign_xwin : 1;
|
||||
guint fullscreen_on_map : 1;
|
||||
guint handling_configure : 1;
|
||||
guint is_cursor_visible : 1;
|
||||
|
||||
Display *xdpy;
|
||||
|
Loading…
Reference in New Issue
Block a user