The drawers were half done: the drop wrote ~/.dt/panel-drawers and the dock icon went away, but the icon never showed, because it was added to an already realized form and sat below the drawer's height. - WmMcdePanel.c: the drawer's icons (SUBPANEL/TAB/CLASS/TAB/COMMAND in ~/.dt/panel-drawers) are widgets in the subpanel's form; the last one takes the form's bottom attachment over from the previous last child, as CDE's own last control does in SubpanelControlCreate -- that is what makes the form, and the drawer, as high as its contents. A drag from the dock onto a drawer's main-row control stores the class and command and leaves the dock; a drag from the drawer onto the dock keeps it and removes it from the file. A program in a drawer is not shown again in the dock. - UI.c: SubpanelCreate calls McdePanelFillDrawer at its end, after the CDE controls and before the form is first laid out. (An earlier hook in AddSubpanel never ran for the standard drawers: those are made by SubpanelCreate from MainControlCreate.) - WmMcdePanel.h: the declaration. Measured in Xvfb (1280x800, fresh HOME, ttsession + dtwm + dtbar): - with ~/.dt/panel-drawers holding "FilesSubpanel XClock 'xclock' '-digital'", the opened Files drawer shows the clock icon under Downloads; the log says "drawer 'FilesSubpanel' to 311 pixel high for 1 icons", form and shell 311 (before the change: form 244, icon at y=244 outside); - dragging that icon from the drawer onto the dock: panel-drawers empty, panel-apps "XClock 'xclock' '-digital'" (screenshot: the icon in the dock); - dragging the running xeyes icon onto the Files control: panel-drawers "FilesSubpanel XEyes 'xeyes'" and the dock back to 0 buttons. make mcde-linux MCDE_DIRS="install programs/dtwm" exit=0. An icon added during a running session shows in its drawer after the next session: the posted drawer keeps the height it was created with.
27 lines
1.0 KiB
C
27 lines
1.0 KiB
C
/*
|
|
* WmMcdePanel.h -- MCDE: the programs left of the trash in the front panel
|
|
* (WmMcdePanel.c)
|
|
*
|
|
* License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
|
|
*/
|
|
|
|
#ifndef _WmMcdePanel_h
|
|
#define _WmMcdePanel_h
|
|
|
|
#include <X11/Intrinsic.h>
|
|
|
|
/* after the main panel's controls are made (UI.c, MainControlCreate) */
|
|
extern void McdePanelCreate(void);
|
|
/* before a subpanel's form is realized (UI.c, AddSubpanel): the icons stored
|
|
* for that drawer become part of its layout, so the drawer is sized for them */
|
|
extern void McdePanelFillDrawer(void *subpanel);
|
|
/* the menu button pressed on FORM (PopupMenu.c, PostPopupMenu): True when
|
|
* it was over the part, whose own menu is then posted */
|
|
extern Boolean McdePanelPost(Widget form, XButtonEvent *ev);
|
|
/* a window came or went (WmManage.c): the part is redrawn soon */
|
|
extern void McdePanelChanged(void);
|
|
/* the monitors changed: the panel to the main display (WmMcdeDisplays.c) */
|
|
extern void McdePanelMonitorsChanged(void);
|
|
|
|
#endif /* _WmMcdePanel_h */
|