[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
This commit is contained in:
Dave Davenport 2022-05-07 11:35:09 +02:00
parent 6f971e1110
commit 67496dcb15

View file

@ -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;