diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-21 21:10:12 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-21 21:10:12 +0200 |
commit | 6c1633b80a30c639bc096cc4b98a1da998af38c2 (patch) | |
tree | 0f45096ba3d4cfcb92ae84274e2ce2d53d95f3f7 /src/gui/window.c | |
parent | 3e9f594c7e06017b5d919d79530c39a58de8a3c7 (diff) | |
download | abaos-6c1633b80a30c639bc096cc4b98a1da998af38c2.tar.gz abaos-6c1633b80a30c639bc096cc4b98a1da998af38c2.tar.bz2 |
changed video mode management, moved to video driver,
the VGA driver registers his specific mode data with the
video driver
kernel function now use virtual functions of the video driver
Diffstat (limited to 'src/gui/window.c')
-rw-r--r-- | src/gui/window.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/window.c b/src/gui/window.c index fd53920..681c3b7 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.x - ((widget_t *)widget)->w ) { - ((widget_t *)widget)->x = context->mode.x - ((widget_t *)widget)->w; + 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)->y < 0 ) { ((widget_t *)widget)->y = 0; } - if( ((widget_t *)widget)->y > context->mode.y - ((widget_t *)widget)->h ) { - ((widget_t *)widget)->y = context->mode.y - ((widget_t *)widget)->h; + 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; } composite_widget_draw( obj, context ); |