From 752ff17265f23d4fa9084368d2a90f66521a98e2 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 22 Jul 2017 16:14:14 +0200 Subject: separated video driver in a virtual video driver and a specific VGA video driver --- src/gui/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/window.c') diff --git a/src/gui/window.c b/src/gui/window.c index 1cb1fb1..132dd89 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -39,14 +39,14 @@ void window_draw( void *obj, graphics_context_t *context ) if( ((widget_t *)widget)->x < 0 ) { ((widget_t *)widget)->x = 0; } - if( ((widget_t *)widget)->x > context->mode->base.x - ((widget_t *)widget)->w ) { - ((widget_t *)widget)->x = context->mode->base.x - ((widget_t *)widget)->w; + if( ((widget_t *)widget)->x > context->mode->x - ((widget_t *)widget)->w ) { + ((widget_t *)widget)->x = context->mode->x - ((widget_t *)widget)->w; } if( ((widget_t *)widget)->y < 0 ) { ((widget_t *)widget)->y = 0; } - if( ((widget_t *)widget)->y > context->mode->base.y - ((widget_t *)widget)->h ) { - ((widget_t *)widget)->y = context->mode->base.y - ((widget_t *)widget)->h; + if( ((widget_t *)widget)->y > context->mode->y - ((widget_t *)widget)->h ) { + ((widget_t *)widget)->y = context->mode->y - ((widget_t *)widget)->h; } composite_widget_draw( obj, context ); -- cgit v1.2.3-54-g00ecf