Hi everyone I was playing with the workspace border feature and noticed that it might be useful but it is rather limiting as one can only chose left+right, top+bottom or all borders.
It allows people to have an area which will not be covered by maximized windows (unless they are set to full screen maximization) but it allows only LeftRight and TopBottom combination While I would like to be able to set it to Right only. After playing a bit with it I have created a patch which would allow a user to set the WorkspaceBorder option to eight additional values: Left, Right, Top, Bottom, TopLeft, TopRight, BottomLeft and BottomRight. I didn't modify WPrefs code. It is short with space but I think that a menu with all the available values might do it. Here is the patch: diff -Nru wmaker-crm.next/NEWS wmaker-crm.next.patched/NEWS --- wmaker-crm.next/NEWS 2015-06-22 19:40:15.000000000 +0200 +++ wmaker-crm.next.patched/NEWS 2015-06-22 23:15:26.000000000 +0200 @@ -4,6 +4,22 @@ -- 0.95.7 +workspace border +---------------- + +In addition to the existing values available for the WorkspaceBorder option, +eight new values were added: Left, Right, Top, Bottom, TopLeft, TopRight, +BottomLeft and BottomRight. +Along with already existing values (None, LeftRight, TopBottom, AllDirections) +a user is now able to configure an uncovered border on any side of the screen +including a combination of two sides, e.g. top and left, bottom and right and +so on. +At the moment newly added options are not configurable through the WPrefs app. + +Note that if "full screen maximization" option is set for a window, that +window will ignore this border area, maximizing to full screen. + + Window snapping --------------- diff -Nru wmaker-crm.next/src/defaults.c wmaker- crm.next.patched/src/defaults.c --- wmaker-crm.next/src/defaults.c 2015-06-22 19:40:16.000000000 +0200 +++ wmaker-crm.next.patched/src/defaults.c 2015-06-22 22:49:57.000000000 +0200 @@ -167,7 +167,7 @@ /* WARNING: sum of length of all value strings must not exceed * this value */ -#define TOTAL_VALUES_LENGTH 80 +#define TOTAL_VALUES_LENGTH 100 #define REFRESH_WINDOW_TEXTURES (1<<0) #define REFRESH_MENU_TEXTURE (1<<1) @@ -304,8 +304,16 @@ static WOptionEnumeration seWorkspaceBorder[] = { {"None", WB_NONE, 0}, + {"Left", WB_LEFT, 0}, + {"Right", WB_RIGHT, 0}, + {"Top", WB_TOP, 0}, + {"Bottom", WB_BOTTOM, 0}, {"LeftRight", WB_LEFTRIGHT, 0}, {"TopBottom", WB_TOPBOTTOM, 0}, + {"TopLeft", WB_TOPLEFT, 0}, + {"TopRight", WB_TOPRIGHT, 0}, + {"BottomLeft", WB_BOTTOMLEFT, 0}, + {"BottomRight", WB_BOTTOMRIGHT, 0}, {"AllDirections", WB_ALLDIRS, 0}, {NULL, 0, 0} }; diff -Nru wmaker-crm.next/src/screen.c wmaker- crm.next.patched/src/screen.c --- wmaker-crm.next/src/screen.c 2015-06-22 19:40:16.000000000 +0200 +++ wmaker-crm.next.patched/src/screen.c 2015-06-22 22:52:18.000000000 +0200 @@ -855,13 +855,51 @@ } if (size > 0 && position != WB_NONE) { - if (position & WB_LEFTRIGHT) { + switch (position) { + case WB_LEFT: + scr->totalUsableArea[i].x1 += size; + break; + case WB_RIGHT: + scr->totalUsableArea[i].x2 -= size; + break; + case WB_TOP: + scr->totalUsableArea[i].y1 += size; + break; + case WB_BOTTOM: + scr->totalUsableArea[i].y2 -= size; + break; + case WB_LEFTRIGHT: + scr->totalUsableArea[i].x1 += size; + scr->totalUsableArea[i].x2 -= size; + break; + case WB_TOPBOTTOM: + scr->totalUsableArea[i].y1 += size; + scr->totalUsableArea[i].y2 -= size; + break; + case WB_TOPLEFT: + scr->totalUsableArea[i].x1 += size; + scr->totalUsableArea[i].y1 += size; + break; + case WB_TOPRIGHT: + scr->totalUsableArea[i].x2 -= size; + scr->totalUsableArea[i].y1 += size; + break; + case WB_BOTTOMLEFT: + scr->totalUsableArea[i].x1 += size; + scr->totalUsableArea[i].y2 -= size; + break; + case WB_BOTTOMRIGHT: + scr->totalUsableArea[i].x2 -= size; + scr->totalUsableArea[i].y2 -= size; + break; + case WB_ALLDIRS: scr->totalUsableArea[i].x1 += size; scr->totalUsableArea[i].x2 -= size; - } - if (position & WB_TOPBOTTOM) { scr->totalUsableArea[i].y1 += size; scr->totalUsableArea[i].y2 -= size; + break; + default: + return; } } } diff -Nru wmaker-crm.next/src/WindowMaker.h wmaker- crm.next.patched/src/WindowMaker.h --- wmaker-crm.next/src/WindowMaker.h 2015-06-22 19:40:16.000000000 +0200 +++ wmaker-crm.next.patched/src/WindowMaker.h 2015-06-22 20:14:08.000000000 +0200 @@ -229,9 +229,17 @@ /* workspace border position */ #define WB_NONE 0 -#define WB_LEFTRIGHT 1 -#define WB_TOPBOTTOM 2 -#define WB_ALLDIRS (WB_LEFTRIGHT|WB_TOPBOTTOM) +#define WB_LEFT 1 +#define WB_RIGHT 2 +#define WB_TOP 3 +#define WB_BOTTOM 4 +#define WB_LEFTRIGHT 5 +#define WB_TOPBOTTOM 6 +#define WB_TOPLEFT 7 +#define WB_TOPRIGHT 8 +#define WB_BOTTOMLEFT 9 +#define WB_BOTTOMRIGHT 10 +#define WB_ALLDIRS 11 /* drag maximized window behaviors */ enum { -- Josip Deanovic -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.