mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
directfb: get rid of abs_x,abs_y computation within the backend
The computation of abs_x,abs_y is done by the generic code of GDK when events are raised. We don't care about that anymore. Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
This commit is contained in:
parent
68ba791720
commit
9de2f4b9cc
@ -722,7 +722,6 @@ gdk_event_translate (DFBWindowEvent *dfbevent,
|
|||||||
GDK_DRAWABLE_IMPL_DIRECTFB (private->impl)->height;
|
GDK_DRAWABLE_IMPL_DIRECTFB (private->impl)->height;
|
||||||
}
|
}
|
||||||
|
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -766,8 +765,6 @@ gdk_event_translate (DFBWindowEvent *dfbevent,
|
|||||||
impl->width, impl->height);
|
impl->width, impl->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
gdk_window_clear (window);
|
gdk_window_clear (window);
|
||||||
gdk_window_invalidate_rect (window, NULL, TRUE);
|
gdk_window_invalidate_rect (window, NULL, TRUE);
|
||||||
}
|
}
|
||||||
|
@ -136,8 +136,6 @@ _gdk_directfb_window_scroll (GdkWindow *window,
|
|||||||
obj_impl->height);
|
obj_impl->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
if (invalidate_region)
|
if (invalidate_region)
|
||||||
{
|
{
|
||||||
gdk_window_invalidate_region (window, invalidate_region, TRUE);
|
gdk_window_invalidate_region (window, invalidate_region, TRUE);
|
||||||
|
@ -170,8 +170,6 @@ void gdk_directfb_window_send_crossing_events (GdkWindow *src,
|
|||||||
GdkWindow *dest,
|
GdkWindow *dest,
|
||||||
GdkCrossingMode mode);
|
GdkCrossingMode mode);
|
||||||
|
|
||||||
void _gdk_directfb_calc_abs (GdkWindow *window);
|
|
||||||
|
|
||||||
GdkWindow * gdk_directfb_window_find_toplevel (GdkWindow *window);
|
GdkWindow * gdk_directfb_window_find_toplevel (GdkWindow *window);
|
||||||
|
|
||||||
|
|
||||||
|
@ -366,8 +366,6 @@ gdk_directfb_window_new (GdkWindow *parent,
|
|||||||
private->x = x;
|
private->x = x;
|
||||||
private->y = y;
|
private->y = y;
|
||||||
|
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
impl->drawable.width = MAX (1, attributes->width);
|
impl->drawable.width = MAX (1, attributes->width);
|
||||||
impl->drawable.height = MAX (1, attributes->height);
|
impl->drawable.height = MAX (1, attributes->height);
|
||||||
|
|
||||||
@ -559,8 +557,6 @@ _gdk_window_impl_new (GdkWindow *window,
|
|||||||
|
|
||||||
private->parent = parent_private;
|
private->parent = parent_private;
|
||||||
|
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
impl->drawable.width = MAX (1, attributes->width);
|
impl->drawable.width = MAX (1, attributes->width);
|
||||||
impl->drawable.height = MAX (1, attributes->height);
|
impl->drawable.height = MAX (1, attributes->height);
|
||||||
|
|
||||||
@ -1432,7 +1428,6 @@ gdk_directfb_window_move (GdkWindow *window,
|
|||||||
GdkRectangle old = { private->x, private->y,width,height };
|
GdkRectangle old = { private->x, private->y,width,height };
|
||||||
|
|
||||||
_gdk_directfb_move_resize_child (window, x, y, width, height);
|
_gdk_directfb_move_resize_child (window, x, y, width, height);
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
if (GDK_WINDOW_IS_MAPPED (private))
|
if (GDK_WINDOW_IS_MAPPED (private))
|
||||||
{
|
{
|
||||||
@ -1525,7 +1520,6 @@ gdk_directfb_window_move_resize (GdkWindow *window,
|
|||||||
|
|
||||||
_gdk_directfb_move_resize_child (window,
|
_gdk_directfb_move_resize_child (window,
|
||||||
new.x, new.y, new.width, new.height);
|
new.x, new.y, new.width, new.height);
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
if (GDK_WINDOW_IS_MAPPED (private))
|
if (GDK_WINDOW_IS_MAPPED (private))
|
||||||
{
|
{
|
||||||
@ -1944,39 +1938,6 @@ gdk_directfb_window_get_geometry (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_gdk_directfb_calc_abs (GdkWindow *window)
|
|
||||||
{
|
|
||||||
GdkWindowObject *private;
|
|
||||||
GdkDrawableImplDirectFB *impl;
|
|
||||||
GList *list;
|
|
||||||
|
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
||||||
|
|
||||||
private = GDK_WINDOW_OBJECT (window);
|
|
||||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
|
|
||||||
|
|
||||||
impl->abs_x = private->x;
|
|
||||||
impl->abs_y = private->y;
|
|
||||||
|
|
||||||
if (private->parent)
|
|
||||||
{
|
|
||||||
GdkDrawableImplDirectFB *parent_impl =
|
|
||||||
GDK_DRAWABLE_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (private->parent)->impl);
|
|
||||||
|
|
||||||
impl->abs_x += parent_impl->abs_x;
|
|
||||||
impl->abs_y += parent_impl->abs_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
D_DEBUG_AT (GDKDFB_Window, "%s( %p ) -> %4d,%4d\n", G_STRFUNC,
|
|
||||||
window, impl->abs_x, impl->abs_y);
|
|
||||||
|
|
||||||
for (list = private->children; list; list = list->next)
|
|
||||||
{
|
|
||||||
_gdk_directfb_calc_abs (list->data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_directfb_window_get_deskrelative_origin (GdkWindow *window,
|
gdk_directfb_window_get_deskrelative_origin (GdkWindow *window,
|
||||||
gint *x,
|
gint *x,
|
||||||
@ -2597,7 +2558,8 @@ gdk_directfb_create_child_window (GdkWindow *parent,
|
|||||||
private->x = x;
|
private->x = x;
|
||||||
private->y = y;
|
private->y = y;
|
||||||
|
|
||||||
_gdk_directfb_calc_abs (window);
|
private->abs_x = 0;
|
||||||
|
private->abs_y = 0;
|
||||||
|
|
||||||
impl->drawable.width = w;
|
impl->drawable.width = w;
|
||||||
impl->drawable.height = h;
|
impl->drawable.height = h;
|
||||||
@ -2683,10 +2645,6 @@ gdk_window_foreign_new_for_display (GdkDisplay* display, GdkNativeWindow anid)
|
|||||||
private->input_only = TRUE;
|
private->input_only = TRUE;
|
||||||
impl->drawable.surface = NULL;
|
impl->drawable.surface = NULL;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* Position ourselevs
|
|
||||||
*/
|
|
||||||
_gdk_directfb_calc_abs (window);
|
|
||||||
|
|
||||||
/* We default to all events least surprise to the user
|
/* We default to all events least surprise to the user
|
||||||
* minus the poll for motion events
|
* minus the poll for motion events
|
||||||
|
Loading…
Reference in New Issue
Block a user