mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Add drawers to wmaker!
Drawers are horizontal docks, and they can themselves only live in the dock To use them, right click on the dock or a docked appicon and select "Add a drawer". Then move appicons into the drawer (drag them with the mouse). You may change the icon of the drawer. By default, drawers auto-expand and -collapse, and auto-raise/lower. This can be customized in the same way as for the clip. Set DisableDrawers to YES in G/D/WindowMaker if you do not want to see the menu entry to add a drawer. Just discovered this bug: the auto-attract icon functionality will not work (to be precise, it crashes WM!) if the clip is disabled (NoClip=YES). Will fix shortly, of course.
This commit is contained in:
committed by
Carlos R. Mafra
parent
707ce34a5e
commit
e14e6b3da8
@@ -325,6 +325,8 @@ WDefaultEntry staticOptionList[] = {
|
||||
NULL, getBool, setIfDockPresent, NULL, NULL},
|
||||
{"DisableClip", "NO", (void *)WM_CLIP,
|
||||
NULL, getBool, setIfDockPresent, NULL, NULL},
|
||||
{"DisableDrawers", "NO", (void *)WM_DRAWER,
|
||||
NULL, getBool, setIfDockPresent, NULL, NULL},
|
||||
{"DisableMiniwindows", "NO", NULL,
|
||||
&wPreferences.disable_miniwindows, getBool, NULL, NULL, NULL}
|
||||
};
|
||||
@@ -1132,6 +1134,7 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
|
||||
void wDefaultUpdateIcons(WScreen *scr)
|
||||
{
|
||||
WAppIcon *aicon = scr->app_icon_list;
|
||||
WDrawerChain *dc;
|
||||
WWindow *wwin = scr->focused_window;
|
||||
|
||||
while (aicon) {
|
||||
@@ -1144,6 +1147,9 @@ void wDefaultUpdateIcons(WScreen *scr)
|
||||
if (!wPreferences.flags.noclip)
|
||||
wClipIconPaint(scr->clip_icon);
|
||||
|
||||
for (dc = scr->drawers; dc != NULL; dc = dc->next)
|
||||
wDrawerIconPaint(dc->adrawer->icon_array[0]);
|
||||
|
||||
while (wwin) {
|
||||
if (wwin->icon && wwin->flags.miniaturized)
|
||||
wIconChangeImageFile(wwin->icon, NULL);
|
||||
@@ -2325,10 +2331,15 @@ static int setIfDockPresent(WScreen * scr, WDefaultEntry * entry, char *flag, lo
|
||||
switch (which) {
|
||||
case WM_DOCK:
|
||||
wPreferences.flags.nodock = wPreferences.flags.nodock || *flag;
|
||||
// Drawers require the dock
|
||||
wPreferences.flags.nodrawer = wPreferences.flags.nodrawer || wPreferences.flags.nodock;
|
||||
break;
|
||||
case WM_CLIP:
|
||||
wPreferences.flags.noclip = wPreferences.flags.noclip || *flag;
|
||||
break;
|
||||
case WM_DRAWER:
|
||||
wPreferences.flags.nodrawer = wPreferences.flags.nodrawer || *flag;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -2379,6 +2390,13 @@ static int setIconTile(WScreen * scr, WDefaultEntry * entry, WTexture ** texture
|
||||
scr->clip_tile = wClipMakeTile(scr, img);
|
||||
}
|
||||
|
||||
if (!wPreferences.flags.nodrawer) {
|
||||
if (scr->drawer_tile) {
|
||||
RReleaseImage(scr->drawer_tile);
|
||||
}
|
||||
scr->drawer_tile = wDrawerMakeTile(scr, img);
|
||||
}
|
||||
|
||||
scr->icon_tile_pixmap = pixmap;
|
||||
|
||||
if (scr->def_icon_rimage) {
|
||||
|
||||
Reference in New Issue
Block a user