gdk_surface_is_destroyed
gdk_surface_get_display
gdk_surface_hide
-gdk_surface_is_viewable
gdk_surface_get_mapped
gdk_surface_translate_coordinates
gdk_surface_begin_resize_drag
show_popup (GdkSurface *surface)
{
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- _gdk_surface_update_viewable (surface);
gdk_broadway_surface_show (surface, FALSE);
gdk_surface_invalidate_rect (surface, NULL);
}
if (!was_mapped)
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- _gdk_surface_update_viewable (surface);
-
gdk_broadway_surface_show (surface, FALSE);
if (!was_mapped)
- {
- if (gdk_surface_is_viewable (surface))
- gdk_surface_invalidate_rect (surface, NULL);
- }
+ gdk_surface_invalidate_rect (surface, NULL);
}
static gboolean
const cairo_region_t *region);
void _gdk_surface_clear_update_area (GdkSurface *surface);
void _gdk_surface_update_size (GdkSurface *surface);
-gboolean _gdk_surface_update_viewable (GdkSurface *surface);
GdkGLContext * gdk_surface_get_paint_gl_context (GdkSurface *surface,
GError **error);
void gdk_surface_get_unscaled_size (GdkSurface *surface,
return GDK_SURFACE_IS_MAPPED (surface);
}
-/**
- * gdk_surface_is_viewable:
- * @surface: a #GdkSurface
- *
- * Check if the surface and all ancestors of the surface are
- * mapped. (This is not necessarily "viewable" in the X sense, since
- * we only check as far as we have GDK surface parents, not to the root
- * surface.)
- *
- * Returns: %TRUE if the surface is viewable
- **/
-gboolean
-gdk_surface_is_viewable (GdkSurface *surface)
-{
- g_return_val_if_fail (GDK_IS_SURFACE (surface), FALSE);
-
- if (surface->destroyed)
- return FALSE;
-
- return surface->viewable;
-}
-
GdkGLContext *
gdk_surface_get_shared_data_gl_context (GdkSurface *surface)
{
surface->active_update_area = surface->update_area;
surface->update_area = NULL;
- if (gdk_surface_is_viewable (surface))
+ if (GDK_SURFACE_IS_MAPPED (surface))
{
cairo_region_t *expose_region;
gboolean handled;
g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (surface))
- return;
-
- if (!surface->viewable)
+ if (!GDK_SURFACE_IS_MAPPED (surface))
return;
if (!rect)
g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (surface))
+ if (!GDK_SURFACE_IS_MAPPED (surface))
return;
- if (!surface->viewable || cairo_region_is_empty (region))
+ if (cairo_region_is_empty (region))
return;
r.x = 0;
*mask = tmp_mask;
}
-/* Returns TRUE If the native surface was mapped or unmapped */
-static gboolean
-set_viewable (GdkSurface *w,
- gboolean val)
-{
- if (w->viewable == val)
- return FALSE;
-
- w->viewable = val;
-
- return FALSE;
-}
-
-gboolean
-_gdk_surface_update_viewable (GdkSurface *surface)
-{
- return set_viewable (surface, GDK_SURFACE_IS_MAPPED (surface));
-}
-
/**
* gdk_surface_hide:
* @surface: a #GdkSurface
mapped = GDK_SURFACE_IS_MAPPED (surface);
sticky = GDK_SURFACE_IS_STICKY (surface);
- _gdk_surface_update_viewable (surface);
-
if (GDK_IS_TOPLEVEL (surface))
g_object_notify (G_OBJECT (surface), "state");
void gdk_surface_set_input_region (GdkSurface *surface,
cairo_region_t *region);
-GDK_AVAILABLE_IN_ALL
-gboolean gdk_surface_is_viewable (GdkSurface *surface);
-
GDK_AVAILABLE_IN_ALL
gboolean gdk_surface_get_mapped (GdkSurface *surface);
guint destroyed : 2;
guint support_multidevice : 1;
- guint viewable : 1; /* mapped and all parents mapped */
guint in_update : 1;
guint frame_clock_events_paused : 1;
guint autohide : 1;
if (!was_mapped)
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- _gdk_surface_update_viewable (surface);
-
gdk_wayland_surface_show (surface, FALSE);
if (!was_mapped)
- {
- if (gdk_surface_is_viewable (surface))
- gdk_surface_invalidate_rect (surface, NULL);
- }
+ gdk_surface_invalidate_rect (surface, NULL);
}
static gboolean
{
gdk_win32_surface_raise (surface);
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- _gdk_surface_update_viewable (surface);
show_window_internal (surface, FALSE, FALSE);
gdk_surface_invalidate_rect (surface, NULL);
}
if (!was_mapped)
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- _gdk_surface_update_viewable (surface);
-
gdk_win32_surface_show (surface, FALSE);
if (!was_mapped)
- {
- if (gdk_surface_is_viewable (surface))
- gdk_surface_invalidate_rect (surface, NULL);
- }
+ gdk_surface_invalidate_rect (surface, NULL);
}
static gboolean
{
gdk_x11_surface_raise (surface);
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- _gdk_surface_update_viewable (surface);
gdk_x11_surface_show (surface, FALSE);
gdk_surface_invalidate_rect (surface, NULL);
}
GdkSurface *surface = GDK_SURFACE (toplevel);
GdkGeometry geometry;
GdkSurfaceHints mask;
+ gboolean was_mapped;
gdk_x11_surface_unminimize (surface);
else
gdk_x11_surface_unfullscreen (surface);
- {
- gboolean was_mapped;
- gboolean did_show;
-
if (surface->destroyed)
return TRUE;
if (!was_mapped)
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
- did_show = _gdk_surface_update_viewable (surface);
-
- gdk_x11_surface_show (surface, !did_show ? was_mapped : TRUE);
+ gdk_x11_surface_show (surface, was_mapped);
if (!was_mapped)
- {
- if (gdk_surface_is_viewable (surface))
- gdk_surface_invalidate_rect (surface, NULL);
- }
- }
+ gdk_surface_invalidate_rect (surface, NULL);
return TRUE;
}
native = gtk_widget_get_native (widget);
if (!native ||
- !gdk_surface_is_viewable(gtk_native_get_surface (native)))
+ !gdk_surface_get_mapped (gtk_native_get_surface (native)))
{
g_object_unref (shortcut);
continue;
case GDK_ENTER_NOTIFY:
case GDK_PROXIMITY_IN:
case GDK_SCROLL:
- return gdk_surface_is_viewable (gdk_event_get_surface (event));
+ return gdk_surface_get_mapped (gdk_event_get_surface (event));
#if 0
/* The following events are the second half of paired events;
double x, y;
/* We check only once for is-still-visible; if someone
- * hides the window in on of the signals on the widget,
+ * hides the window in one of the signals on the widget,
* they are responsible for returning TRUE to terminate
* handling.
*/