Skip to content

Commit

Permalink
Split out get_display_size().
Browse files Browse the repository at this point in the history
  • Loading branch information
alisabedard committed Jun 7, 2017
1 parent e88d552 commit dde77d4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions geometry.c
Expand Up @@ -73,6 +73,12 @@ static void init_geometry_for_screen_size(struct GeometryData * g,
} else // Position not specified
center(g->geometry, screen_size);
}
__attribute__((pure))
static struct JBWMSize get_display_size(Display * d, const uint8_t screen)
{
return (struct JBWMSize) {DisplayWidth(d, screen),
DisplayHeight(d, screen)};
}
static void init_geometry_for_screen(Display * d,
struct JBWMClient * c, struct JBWMRectangle * g,
struct JBWMRectangle * restrict attribute_geometry)
Expand All @@ -81,8 +87,7 @@ static void init_geometry_for_screen(Display * d,
if (s) {
init_geometry_for_screen_size(&(struct GeometryData){ .display
= d, .attribute = attribute_geometry, .geometry = g,
.window = c->window}, (struct JBWMSize){
DisplayWidth(d, s->id), DisplayHeight(d, s->id)});
.window = c->window}, get_display_size(d, s->id));
} else
g->x = g->y = 0;
}
Expand Down

0 comments on commit dde77d4

Please sign in to comment.