mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
Various fixes for native windows:
move_region_on_impl() - doesn't need to copy anything if dx/dy == 0 Ensure that we queue an update when invalidating an empty area but we have outstanding moves Temporarily unset background when moving native child windows
This commit is contained in:
parent
76e23f00da
commit
4a0cb4a240
@ -2382,6 +2382,12 @@ move_region_on_impl (GdkWindowObject *private,
|
||||
GdkWindowObject *impl_window;
|
||||
gboolean free_region;
|
||||
|
||||
if (dx == 0 && dy == 0)
|
||||
{
|
||||
gdk_region_destroy (region);
|
||||
return;
|
||||
}
|
||||
|
||||
free_region = TRUE;
|
||||
impl_window = gdk_window_get_impl_window (private);
|
||||
|
||||
@ -4567,14 +4573,19 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
impl_window = gdk_window_get_impl_window (private);
|
||||
|
||||
if (!gdk_region_empty (visible_region))
|
||||
if (!gdk_region_empty (visible_region) ||
|
||||
/* Even if we're not exposing anything, make sure we process
|
||||
idles for windows with outstanding moves */
|
||||
(impl_window->outstanding_moves != NULL &&
|
||||
impl_window->update_area == NULL))
|
||||
{
|
||||
if (debug_updates)
|
||||
draw_ugly_color (window, region);
|
||||
|
||||
/* Convert to impl coords */
|
||||
impl_window = gdk_window_get_impl_window (private);
|
||||
gdk_region_offset (visible_region, private->abs_x, private->abs_y);
|
||||
if (impl_window->update_area)
|
||||
{
|
||||
|
@ -190,17 +190,18 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
GdkWindowImplX11 *impl;
|
||||
GdkWindowObject *obj;
|
||||
GdkRectangle new_info;
|
||||
|
||||
gint dx, dy;
|
||||
gboolean is_move;
|
||||
gboolean is_resize;
|
||||
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_X11 (GDK_WINDOW_OBJECT (window)->impl);
|
||||
obj = GDK_WINDOW_OBJECT (window);
|
||||
|
||||
is_resize =
|
||||
width != obj->width ||
|
||||
height != obj->height;
|
||||
|
||||
obj->x = x;
|
||||
obj->y = y;
|
||||
obj->width = width;
|
||||
@ -210,11 +211,15 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
new_info.y = obj->y + obj->parent->abs_y;
|
||||
new_info.width = obj->width;
|
||||
new_info.height = obj->height;
|
||||
|
||||
|
||||
_gdk_x11_window_tmp_unset_bg (window, TRUE);
|
||||
_gdk_x11_window_tmp_unset_bg (obj->parent, FALSE);
|
||||
if (is_resize)
|
||||
move_resize (window, &new_info);
|
||||
else
|
||||
move (window, &new_info);
|
||||
_gdk_x11_window_tmp_reset_bg (obj->parent, FALSE);
|
||||
_gdk_x11_window_tmp_reset_bg (window, TRUE);
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
@ -290,18 +290,15 @@ _gdk_x11_window_tmp_unset_bg (GdkWindow *window,
|
||||
|
||||
if (private->input_only || private->destroyed ||
|
||||
(private->window_type != GDK_WINDOW_ROOT &&
|
||||
!GDK_WINDOW_IS_MAPPED (window)) ||
|
||||
!_gdk_window_has_impl (window) ||
|
||||
!GDK_WINDOW_IS_X11 (window))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (private->window_type != GDK_WINDOW_ROOT &&
|
||||
!GDK_WINDOW_IS_MAPPED (window)))
|
||||
return;
|
||||
|
||||
|
||||
if (_gdk_window_has_impl (window) &&
|
||||
GDK_WINDOW_IS_X11 (window) &&
|
||||
private->window_type != GDK_WINDOW_ROOT &&
|
||||
private->window_type != GDK_WINDOW_FOREIGN)
|
||||
{
|
||||
tmp_unset_bg (window);
|
||||
}
|
||||
tmp_unset_bg (window);
|
||||
|
||||
if (recurse)
|
||||
{
|
||||
@ -324,18 +321,15 @@ _gdk_x11_window_tmp_reset_bg (GdkWindow *window,
|
||||
|
||||
if (private->input_only || private->destroyed ||
|
||||
(private->window_type != GDK_WINDOW_ROOT &&
|
||||
!GDK_WINDOW_IS_MAPPED (window)) ||
|
||||
!_gdk_window_has_impl (window) ||
|
||||
!GDK_WINDOW_IS_X11 (window))
|
||||
{
|
||||
return;
|
||||
}
|
||||
!GDK_WINDOW_IS_MAPPED (window)))
|
||||
return;
|
||||
|
||||
if (private->window_type != GDK_WINDOW_ROOT &&
|
||||
|
||||
if (_gdk_window_has_impl (window) &&
|
||||
GDK_WINDOW_IS_X11 (window) &&
|
||||
private->window_type != GDK_WINDOW_ROOT &&
|
||||
private->window_type != GDK_WINDOW_FOREIGN)
|
||||
{
|
||||
tmp_reset_bg (window);
|
||||
}
|
||||
tmp_reset_bg (window);
|
||||
|
||||
if (recurse)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user