From 67496dcb15e3ac673002acdb5f0a9ab0ab9c6e8f Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 7 May 2022 11:35:09 +0200 Subject: [View] Remove some, broken, logic that misplaces the view. When listview is not present or in not in fixed height mode it would force anchor to north, this is not desirable. Fixes: #1630 --- source/view.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/source/view.c b/source/view.c index b1e267e8..ae707190 100644 --- a/source/view.c +++ b/source/view.c @@ -314,19 +314,8 @@ static const int loc_transtable[9] = { static void rofi_view_calculate_window_position(RofiViewState *state) { int location = rofi_theme_get_position(WIDGET(state->main_window), "location", loc_transtable[config.location]); - int anchor = location; - if (!listview_get_fixed_num_lines(state->list_view)) { - anchor = location; - if (location == WL_CENTER) { - anchor = WL_NORTH; - } else if (location == WL_EAST) { - anchor = WL_NORTH_EAST; - } else if (location == WL_WEST) { - anchor = WL_NORTH_WEST; - } - } - anchor = - rofi_theme_get_position(WIDGET(state->main_window), "anchor", anchor); + int anchor = + rofi_theme_get_position(WIDGET(state->main_window), "anchor", location); if (CacheState.fullscreen) { state->x = CacheState.mon.x; -- cgit v1.2.3