mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
Remove repeated functions enclosed by #if 0
There are already working versions of these functions, so let's remove these copies.
This commit is contained in:
79
src/screen.c
79
src/screen.c
@@ -860,85 +860,6 @@ void wScreenUpdateUsableArea(WScreen * scr)
|
||||
wArrangeIcons(scr, True);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void wScreenUpdateUsableArea(WScreen * scr)
|
||||
{
|
||||
scr->totalUsableArea = scr->usableArea;
|
||||
|
||||
if (scr->dock && (!scr->dock->lowered || wPreferences.no_window_over_dock)) {
|
||||
|
||||
int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE;
|
||||
|
||||
if (scr->dock->on_right_side) {
|
||||
scr->totalUsableArea.x2 = WMIN(scr->totalUsableArea.x2, scr->scr_width - offset);
|
||||
} else {
|
||||
scr->totalUsableArea.x1 = WMAX(scr->totalUsableArea.x1, offset);
|
||||
}
|
||||
}
|
||||
|
||||
if (wPreferences.no_window_over_icons) {
|
||||
if (wPreferences.icon_yard & IY_VERT) {
|
||||
|
||||
if (!(wPreferences.icon_yard & IY_RIGHT)) {
|
||||
scr->totalUsableArea.x1 += wPreferences.icon_size;
|
||||
} else {
|
||||
scr->totalUsableArea.x2 -= wPreferences.icon_size;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (wPreferences.icon_yard & IY_TOP) {
|
||||
scr->totalUsableArea.y1 += wPreferences.icon_size;
|
||||
} else {
|
||||
scr->totalUsableArea.y2 -= wPreferences.icon_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef NETWM_HINTS
|
||||
{
|
||||
WArea area;
|
||||
if (wNETWMGetUsableArea(scr, &area)) {
|
||||
scr->totalUsableArea.x1 = WMAX(scr->totalUsableArea.x1, area.x1);
|
||||
scr->totalUsableArea.y1 = WMAX(scr->totalUsableArea.y1, area.y1);
|
||||
scr->totalUsableArea.x2 = WMIN(scr->totalUsableArea.x2, area.x2);
|
||||
scr->totalUsableArea.y2 = WMIN(scr->totalUsableArea.y2, area.y2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (scr->totalUsableArea.x2 - scr->totalUsableArea.x1 < scr->scr_width / 2) {
|
||||
scr->totalUsableArea.x2 = scr->usableArea.x2;
|
||||
scr->totalUsableArea.x1 = scr->usableArea.x1;
|
||||
}
|
||||
if (scr->totalUsableArea.y2 - scr->totalUsableArea.y1 < scr->scr_height / 2) {
|
||||
scr->totalUsableArea.y2 = scr->usableArea.y2;
|
||||
scr->totalUsableArea.y1 = scr->usableArea.y1;
|
||||
}
|
||||
#ifdef NETWM_HINTS
|
||||
wNETWMUpdateWorkarea(scr);
|
||||
#endif
|
||||
|
||||
{
|
||||
unsigned size = wPreferences.workspace_border_size;
|
||||
unsigned position = wPreferences.workspace_border_position;
|
||||
|
||||
if (size > 0 && position != WB_NONE) {
|
||||
if (position & WB_LEFTRIGHT) {
|
||||
scr->totalUsableArea.x1 += size;
|
||||
scr->totalUsableArea.x2 -= size;
|
||||
}
|
||||
if (position & WB_TOPBOTTOM) {
|
||||
scr->totalUsableArea.y1 += size;
|
||||
scr->totalUsableArea.y2 -= size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wPreferences.auto_arrange_icons) {
|
||||
wArrangeIcons(scr, True);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void wScreenRestoreState(WScreen * scr)
|
||||
{
|
||||
WMPropList *state;
|
||||
|
||||
Reference in New Issue
Block a user