Skip to content

Commit

Permalink
glw: set $ui.aspect
Browse files Browse the repository at this point in the history
  • Loading branch information
andoma committed Aug 1, 2015
1 parent e2d1c2e commit 44a63bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/glw/glw.c
Expand Up @@ -189,6 +189,7 @@ glw_init3(glw_root_t *gr,
gr->gr_screensaver_active = prop_create(gr->gr_prop_ui, "screensaverActive");
gr->gr_prop_width = prop_create(gr->gr_prop_ui, "width");
gr->gr_prop_height = prop_create(gr->gr_prop_ui, "height");
gr->gr_prop_aspect = prop_create(gr->gr_prop_ui, "aspect");

prop_set_int(gr->gr_screensaver_active, 0);

Expand Down Expand Up @@ -536,6 +537,7 @@ glw_prepare_frame(glw_root_t *gr, int flags)
prop_set_int(gr->gr_screensaver_active, glw_screensaver_is_active(gr));
prop_set_int(gr->gr_prop_width, gr->gr_width);
prop_set_int(gr->gr_prop_height, gr->gr_height);
prop_set_float(gr->gr_prop_aspect, (float)gr->gr_width / gr->gr_height);

if(gr->gr_prop_dispatcher != NULL)
gr->gr_prop_dispatcher(gr->gr_courier, gr->gr_prop_maxtime);
Expand Down
1 change: 1 addition & 0 deletions src/ui/glw/glw.h
Expand Up @@ -758,6 +758,7 @@ typedef struct glw_root {

prop_t *gr_prop_width;
prop_t *gr_prop_height;
prop_t *gr_prop_aspect;

float gr_mouse_x;
float gr_mouse_y;
Expand Down

0 comments on commit 44a63bc

Please sign in to comment.