mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +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
15
src/screen.c
15
src/screen.c
@@ -94,6 +94,7 @@ static WMPropList *dApplications = NULL;
|
||||
static WMPropList *dWorkspace;
|
||||
static WMPropList *dDock;
|
||||
static WMPropList *dClip;
|
||||
static WMPropList *dDrawers = NULL;
|
||||
|
||||
static void make_keys(void)
|
||||
{
|
||||
@@ -104,6 +105,7 @@ static void make_keys(void)
|
||||
dWorkspace = WMCreatePLString("Workspace");
|
||||
dDock = WMCreatePLString("Dock");
|
||||
dClip = WMCreatePLString("Clip");
|
||||
dDrawers = WMCreatePLString("Drawers");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -863,6 +865,10 @@ void wScreenRestoreState(WScreen * scr)
|
||||
state = WMGetFromPLDictionary(scr->session_state, dClip);
|
||||
scr->clip_icon = wClipRestoreState(scr, state);
|
||||
}
|
||||
|
||||
if (!wPreferences.flags.nodrawer) {
|
||||
wDrawersRestoreState(scr);
|
||||
}
|
||||
|
||||
wWorkspaceRestoreState(scr);
|
||||
|
||||
@@ -910,6 +916,15 @@ void wScreenSaveState(WScreen * scr)
|
||||
|
||||
wWorkspaceSaveState(scr, old_state);
|
||||
|
||||
if (!wPreferences.flags.nodrawer) {
|
||||
wDrawersSaveState(scr);
|
||||
} else {
|
||||
if ((foo = WMGetFromPLDictionary(old_state, dDrawers)) != NULL) {
|
||||
WMPutInPLDictionary(scr->session_state, dDrawers, foo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (wPreferences.save_session_on_exit) {
|
||||
wSessionSaveState(scr);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user