mir: Remove redundant calls
This commit is contained in:
		@ -154,18 +154,6 @@ set_surface_state (GdkMirWindowImpl *impl,
 | 
				
			|||||||
    mir_surface_set_state (impl->surface, state);
 | 
					    mir_surface_set_state (impl->surface, state);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					 | 
				
			||||||
set_surface_type (GdkMirWindowImpl *impl,
 | 
					 | 
				
			||||||
                  MirSurfaceType type)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  if (impl->surface_type == type)
 | 
					 | 
				
			||||||
    return;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  impl->surface_type = type;
 | 
					 | 
				
			||||||
  if (impl->surface)
 | 
					 | 
				
			||||||
    mir_surface_set_type (impl->surface, type);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
event_cb (MirSurface     *surface,
 | 
					event_cb (MirSurface     *surface,
 | 
				
			||||||
          const MirEvent *event,
 | 
					          const MirEvent *event,
 | 
				
			||||||
@ -230,8 +218,6 @@ ensure_surface_full (GdkWindow *window,
 | 
				
			|||||||
  */
 | 
					  */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  mir_surface_set_event_handler (impl->surface, event_cb, window_ref); // FIXME: Ignore some events until shown
 | 
					  mir_surface_set_event_handler (impl->surface, event_cb, window_ref); // FIXME: Ignore some events until shown
 | 
				
			||||||
  set_surface_type (impl, impl->surface_type);
 | 
					 | 
				
			||||||
  set_surface_state (impl, impl->surface_state);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
@ -276,6 +262,20 @@ ensure_no_surface (GdkWindow *window)
 | 
				
			|||||||
  g_clear_pointer(&impl->surface, mir_surface_release_sync);
 | 
					  g_clear_pointer(&impl->surface, mir_surface_release_sync);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void
 | 
				
			||||||
 | 
					set_surface_type (GdkWindow      *window,
 | 
				
			||||||
 | 
					                  MirSurfaceType  type)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (impl->surface_type == type)
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  impl->surface_type = type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ensure_no_surface (window);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
send_buffer (GdkWindow *window)
 | 
					send_buffer (GdkWindow *window)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -710,7 +710,7 @@ gdk_mir_window_impl_set_type_hint (GdkWindow         *window,
 | 
				
			|||||||
        break;
 | 
					        break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  set_surface_type (GDK_MIR_WINDOW_IMPL (window->impl), mir_type);
 | 
					  set_surface_type (window, mir_type);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static GdkWindowTypeHint
 | 
					static GdkWindowTypeHint
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user