Code cleanup

This commit is contained in:
Pierre Pronchery 2015-10-23 19:35:05 +02:00
parent 63901be78d
commit 50f3ea4be0

View File

@ -483,13 +483,23 @@ static gboolean _panel_window_on_configure_event(GtkWidget * widget,
panel->height); panel->height);
#endif #endif
/* move to the proper position again if necessary */ /* move to the proper position again if necessary */
if((panel->position == PANEL_WINDOW_POSITION_TOP switch(panel->position)
&& cevent->y != panel->root.y) {
|| (panel->position == PANEL_WINDOW_POSITION_BOTTOM case PANEL_WINDOW_POSITION_TOP:
&& cevent->y + cevent->height if(cevent->y != panel->root.y)
!= panel->root.height))
_panel_window_reset(panel); _panel_window_reset(panel);
else else
_panel_window_reset_strut(panel); _panel_window_reset_strut(panel);
break;
case PANEL_WINDOW_POSITION_BOTTOM:
if(cevent->y + cevent->height != panel->root.height)
_panel_window_reset(panel);
else
_panel_window_reset_strut(panel);
break;
default:
_panel_window_reset_strut(panel);
break;
}
return FALSE; return FALSE;
} }