mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call
This commit is contained in:
parent
f22211c881
commit
36ce54878b
@ -359,11 +359,6 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
|
|||||||
|
|
||||||
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
|
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
|
||||||
|
|
||||||
void _gdk_windowing_window_queue_translation (GdkWindow *window,
|
|
||||||
GdkRegion *area,
|
|
||||||
gint dx,
|
|
||||||
gint dy);
|
|
||||||
|
|
||||||
|
|
||||||
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
||||||
*
|
*
|
||||||
|
@ -1119,6 +1119,15 @@ gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdk_offscreen_window_queue_translation (GdkWindow *window,
|
||||||
|
GdkRegion *area,
|
||||||
|
gint dx,
|
||||||
|
gint dy)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
|
gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
|
||||||
{
|
{
|
||||||
@ -1173,6 +1182,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
|
|||||||
iface->merge_child_shapes = gdk_offscreen_window_merge_child_shapes;
|
iface->merge_child_shapes = gdk_offscreen_window_merge_child_shapes;
|
||||||
iface->set_static_gravities = gdk_offscreen_window_set_static_gravities;
|
iface->set_static_gravities = gdk_offscreen_window_set_static_gravities;
|
||||||
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
|
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
|
||||||
|
iface->queue_translation = gdk_offscreen_window_queue_translation;
|
||||||
iface->get_origin = gdk_offscreen_window_get_origin;
|
iface->get_origin = gdk_offscreen_window_get_origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5559,9 +5559,8 @@ gdk_window_move_resize_internal (GdkWindow *window,
|
|||||||
|
|
||||||
/* The old_region area is moved and we queue translations for all expose events
|
/* The old_region area is moved and we queue translations for all expose events
|
||||||
to it that will be sent before the copy operation */
|
to it that will be sent before the copy operation */
|
||||||
/* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
|
GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
|
||||||
if (!gdk_window_is_offscreen (impl_window))
|
old_region, dx, dy);
|
||||||
_gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, old_region, dx, dy);
|
|
||||||
|
|
||||||
/* convert from parent coords to impl */
|
/* convert from parent coords to impl */
|
||||||
gdk_region_offset (copy_area, private->abs_x - private->x, private->abs_y - private->y);
|
gdk_region_offset (copy_area, private->abs_x - private->x, private->abs_y - private->y);
|
||||||
@ -5732,15 +5731,13 @@ gdk_window_scroll (GdkWindow *window,
|
|||||||
/* Get window clip and convert to real window coords, this
|
/* Get window clip and convert to real window coords, this
|
||||||
area is moved and we queue translations for all expose events
|
area is moved and we queue translations for all expose events
|
||||||
to it that will be sent before the copy operation */
|
to it that will be sent before the copy operation */
|
||||||
/* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
|
|
||||||
if (!gdk_window_is_offscreen (impl_window))
|
source_area = gdk_region_copy (private->clip_region);
|
||||||
{
|
/* convert from window coords to real parent */
|
||||||
source_area = gdk_region_copy (private->clip_region);
|
gdk_region_offset (source_area, private->abs_x, private->abs_y);
|
||||||
/* convert from window coords to real parent */
|
GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
|
||||||
gdk_region_offset (source_area, private->abs_x, private->abs_y);
|
source_area, dx, dy);
|
||||||
_gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, source_area, dx, dy);
|
gdk_region_destroy (source_area);
|
||||||
gdk_region_destroy (source_area);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convert from window coords to impl */
|
/* convert from window coords to impl */
|
||||||
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
|
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
|
||||||
@ -5809,13 +5806,10 @@ gdk_window_move_region (GdkWindow *window,
|
|||||||
gdk_window_invalidate_region (window, nocopy_area, FALSE);
|
gdk_window_invalidate_region (window, nocopy_area, FALSE);
|
||||||
gdk_region_destroy (nocopy_area);
|
gdk_region_destroy (nocopy_area);
|
||||||
|
|
||||||
/* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
|
gdk_region_offset (source_area, private->abs_x, private->abs_y);
|
||||||
if (!gdk_window_is_offscreen (impl_window))
|
GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
|
||||||
{
|
source_area, dx, dy);
|
||||||
gdk_region_offset (source_area, private->abs_x, private->abs_y);
|
|
||||||
_gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, source_area, dx, dy);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convert from window coords to impl */
|
/* convert from window coords to impl */
|
||||||
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
|
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
|
||||||
|
|
||||||
|
@ -108,6 +108,11 @@ struct _GdkWindowImplIface
|
|||||||
*/
|
*/
|
||||||
gboolean (* queue_antiexpose) (GdkWindow *window,
|
gboolean (* queue_antiexpose) (GdkWindow *window,
|
||||||
GdkRegion *update_area);
|
GdkRegion *update_area);
|
||||||
|
void (* queue_translation) (GdkWindow *window,
|
||||||
|
GdkRegion *area,
|
||||||
|
gint dx,
|
||||||
|
gint dy);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Interface Functions */
|
/* Interface Functions */
|
||||||
|
@ -357,10 +357,10 @@ gdk_window_queue (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gdk_windowing_window_queue_translation (GdkWindow *window,
|
_gdk_x11_window_queue_translation (GdkWindow *window,
|
||||||
GdkRegion *area,
|
GdkRegion *area,
|
||||||
gint dx,
|
gint dx,
|
||||||
gint dy)
|
gint dy)
|
||||||
{
|
{
|
||||||
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
|
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
|
||||||
item->type = GDK_WINDOW_QUEUE_TRANSLATE;
|
item->type = GDK_WINDOW_QUEUE_TRANSLATE;
|
||||||
|
@ -127,9 +127,12 @@ void _gdk_window_process_expose (GdkWindow *window,
|
|||||||
gulong serial,
|
gulong serial,
|
||||||
GdkRectangle *area);
|
GdkRectangle *area);
|
||||||
|
|
||||||
gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
|
gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
|
||||||
GdkRegion *area);
|
GdkRegion *area);
|
||||||
|
void _gdk_x11_window_queue_translation (GdkWindow *window,
|
||||||
|
GdkRegion *area,
|
||||||
|
gint dx,
|
||||||
|
gint dy);
|
||||||
|
|
||||||
void _gdk_selection_window_destroyed (GdkWindow *window);
|
void _gdk_selection_window_destroyed (GdkWindow *window);
|
||||||
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
|
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
|
||||||
|
@ -5925,6 +5925,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
|
|||||||
iface->merge_child_shapes = gdk_window_x11_merge_child_shapes;
|
iface->merge_child_shapes = gdk_window_x11_merge_child_shapes;
|
||||||
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
|
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
|
||||||
iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
|
iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
|
||||||
|
iface->queue_translation = _gdk_x11_window_queue_translation;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __GDK_WINDOW_X11_C__
|
#define __GDK_WINDOW_X11_C__
|
||||||
|
Loading…
Reference in New Issue
Block a user