Skip to content

Commit

Permalink
dont add extra top spacing if the menu bar is drawn, external bars ca…
Browse files Browse the repository at this point in the history
…n draw on top of it
  • Loading branch information
FelixKratz committed Nov 22, 2023
1 parent 0c956cd commit 2087c95
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,10 @@ CGRect display_bounds_constrained(uint32_t did)
frame.size.height -= g_display_manager.bottom_padding;
}

if (display_manager_menu_bar_hidden()) {
int notch_height = workspace_display_notch_height(did);
if (notch_height > effective_ext_top_padding) {
frame.origin.y += (notch_height - effective_ext_top_padding);
frame.size.height -= (notch_height - effective_ext_top_padding);
}
} else {
CGRect menu = display_manager_menu_bar_rect(did);
frame.origin.y += menu.size.height;
frame.size.height -= menu.size.height;
int notch_height = workspace_display_notch_height(did);
if (notch_height > effective_ext_top_padding) {
frame.origin.y += (notch_height - effective_ext_top_padding);
frame.size.height -= (notch_height - effective_ext_top_padding);
}

if (!display_manager_dock_hidden()) {
Expand Down

0 comments on commit 2087c95

Please sign in to comment.