From bfe487320430af18a681d9fccfe820fdc25cb03c Mon Sep 17 00:00:00 2001 From: o9000 Date: Wed, 22 Mar 2017 17:57:40 +0100 Subject: [PATCH] Fix regression (bad merge in commit 61a80b9) --- src/panel.c | 80 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/src/panel.c b/src/panel.c index a58963f..9b037b0 100644 --- a/src/panel.c +++ b/src/panel.c @@ -708,36 +708,68 @@ void set_panel_window_geometry(Panel *panel) if (!panel->is_hidden) { if (panel_horizontal) { - XMoveResizeWindow(server.display, - panel->main_win, - panel->posx, - panel->posy, - panel->area.width, - panel->area.height); + if (panel_position & TOP) + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy, + panel->area.width, + panel->area.height); + else + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy, + panel->area.width, + panel->area.height); } else { - XMoveResizeWindow(server.display, - panel->main_win, - panel->posx, - panel->posy, - panel->area.width, - panel->area.height); + if (panel_position & LEFT) + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy, + panel->area.width, + panel->area.height); + else + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy, + panel->area.width, + panel->area.height); } } else { int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height; if (panel_horizontal) { - XMoveResizeWindow(server.display, - panel->main_win, - panel->posx, - panel->posy + diff, - panel->hidden_width, - panel->hidden_height); + if (panel_position & TOP) + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy, + panel->hidden_width, + panel->hidden_height); + else + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy + diff, + panel->hidden_width, + panel->hidden_height); } else { - XMoveResizeWindow(server.display, - panel->main_win, - panel->posx + diff, - panel->posy, - panel->hidden_width, - panel->hidden_height); + if (panel_position & LEFT) + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx, + panel->posy, + panel->hidden_width, + panel->hidden_height); + else + XMoveResizeWindow(server.display, + panel->main_win, + panel->posx + diff, + panel->posy, + panel->hidden_width, + panel->hidden_height); } } }