mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-09 01:45:48 +01:00
Unused wsmap, begone!
- held only reference to wnew0, which was the only consumer of wmalloc0, safe trip both of them.
This commit is contained in:
committed by
Carlos R. Mafra
parent
4688e1b568
commit
8d0020cf9a
@@ -4,12 +4,8 @@ BUILT_SOURCES = wconfig.h
|
||||
|
||||
bin_PROGRAMS = wmaker
|
||||
|
||||
#noinst_PROGRAMS = wsmap
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
#wsmap_SOURCES= wsmap.c
|
||||
|
||||
wmaker_SOURCES = \
|
||||
GNUstep.h \
|
||||
WindowMaker.h \
|
||||
@@ -124,15 +120,6 @@ wmaker_LDADD = \
|
||||
@INTLIBS@ \
|
||||
@DLLIBS@
|
||||
|
||||
#wsmap_LDADD = \
|
||||
# $(top_builddir)/WINGs/libWINGs.a\
|
||||
# $(top_builddir)/wrlib/libwraster.la\
|
||||
# @XLFLAGS@ \
|
||||
# @XFTLIBS@ \
|
||||
# @XLIBS@ \
|
||||
# @INTLIBS@ \
|
||||
# @DLLIBS@
|
||||
|
||||
LIBTOOL = $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG)
|
||||
|
||||
.c.o:
|
||||
|
||||
83
src/wsmap.c
83
src/wsmap.c
@@ -1,83 +0,0 @@
|
||||
|
||||
#include "WindowMaker.h"
|
||||
#include "window.h"
|
||||
|
||||
typedef struct {
|
||||
WWindow *wwin;
|
||||
WMLabel *mini;
|
||||
} WSMWindow;
|
||||
|
||||
typedef struct {
|
||||
WScreen *scr;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WSMWindow *windows;
|
||||
int windowCount;
|
||||
|
||||
int xcount, ycount;
|
||||
int wswidth, wsheight;
|
||||
} WWorkspaceMap;
|
||||
|
||||
#define WSMAP_DEFAULT_WIDTH 150
|
||||
|
||||
static WWorkspaceMap *createWorkspaceMap(WMScreen * scr, int xcount, int ycount)
|
||||
{
|
||||
WWorkspaceMap *wsm = wnew0(WWorkspaceMap, 1);
|
||||
WMRect rect;
|
||||
//
|
||||
rect.width = 1024;
|
||||
rect.height = 768;
|
||||
|
||||
wsm->win = WMCreateWindow(scr, "wsmap");
|
||||
|
||||
/* find out the ideal size of the mini-workspaces */
|
||||
|
||||
wsm->wswidth = WSMAP_DEFAULT_WIDTH;
|
||||
wsm->wsheight = (wsm->wswidth * rect.height) / rect.width;
|
||||
|
||||
// check if it fits screen
|
||||
|
||||
wsm->xcount = xcount;
|
||||
wsm->ycount = ycount;
|
||||
|
||||
return wsm;
|
||||
}
|
||||
|
||||
static void handleEvent(WWorkspaceMap * map, XEvent * event)
|
||||
{
|
||||
switch (event->type) {
|
||||
}
|
||||
}
|
||||
|
||||
void wShowWorkspaceMap(WScreen * scr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Display *dpy;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
WWorkspaceMap *wsmap;
|
||||
WMScreen *scr;
|
||||
|
||||
WMInitializeApplication("WSMap", &argc, argv);
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
wfatal("cant open display");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
wsmap = createWorkspaceMap(scr);
|
||||
|
||||
WMRealizeWidget(wsmap->win);
|
||||
WMMapWidget(wsmap->win);
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user