Update of /cvsroot/fink/packages/dists/stable/main/finkinfo/x11-wm
In directory usw-pr-cvs1:/tmp/cvs-serv28784
Added Files:
blackbox-rootless-0.62.1-1.info
blackbox-rootless-0.62.1-1.patch
Log Message:
Moved in from unstable
--- NEW FILE: blackbox-rootless-0.62.1-1.info ---
Package: blackbox-rootless
Version: 0.62.1
Revision: 1
Conflicts: blackbox, blackbox-taskbar
Replaces: blackbox, blackbox-taskbar
Provides: blackbox
Depends: x11
Source: mirror:sourceforge:blackboxwm/blackbox-%v.tar.gz
ConfigureParams: --disable-nls
PatchScript: patch -p1 <%a/%f.patch
CompileScript: ./configure %c
make
InstallScript: make install prefix=%i
mv %i/man %i/share/
DocFiles: README* LICENSE data/README.* ChangeLog
Description: Alternate Window Manager, works in XDarwin's rootless env.
DescDetail: <<
Blackbox is yet another addition to the list of window
managers for the Open Group's X Window System, Version 11 Release 6
and above. Blackbox is built with C++, sharing no common code with
any other window manager (even though the graphics implementation
is similar to that of Window Maker).
This version of blackbox has been patched to be more usable under
rootless X. The menus, which were previously only accessible via
clicking on the root window, may now be opened from the (otherwise
fairly useless) toolbar at the bottom of the screen.
<<
License: BSD
Maintainer: Christian Swinehart <[EMAIL PROTECTED]>
Homepage: http://bbtools.thelinuxcommunity.org/
--- NEW FILE: blackbox-rootless-0.62.1-1.patch ---
diff -Naur blackbox-0.62.1.orig/README.Fink blackbox-0.62.1/README.Fink
--- blackbox-0.62.1.orig/README.Fink Wed Dec 31 19:00:00 1969
+++ blackbox-0.62.1/README.Fink Fri Feb 1 15:44:24 2002
@@ -0,0 +1,26 @@
+This revision of Blackbox has been specially patched to be more usable
+within a rootless X environment. All of the Blackbox menus may now be
+accessed by clicks to the toolbar. Specifically:
+
+ o The Root Menu: Click on the clock at the left end of the toolbar
+ for the `root' launcher window which contains a
+ list of apps. To customize this, examine the file
+ @PREFIX@/share/Blackbox/menu.
+
+ o Workspace Menu: Click on the workspace name at the right of the
+ toolbar. This menu allows you to switch between
+ workspaces (a.k.a. Virtual Desktops), or create
+ new ones.
+
+ o Icons Menu: Click the central window-name region of the
+ toolbar. This menu contains a list of any currently
+ iconified/minimized windows (via the [_] button on
+ window title-bars).
+
+ o Toolbar Options Menu: Still reached by right-clicking anywhere on
+ the toolbar.
+
+Additionally, the title-bar widgets have been rearranged to be
+slightly less pathological (i.e., no longer placing the close button
+two pixels away from the resize button). Customizable button
+arrangements will come in the next revision.
diff -Naur blackbox-0.62.1.orig/data/menu.in blackbox-0.62.1/data/menu.in
--- blackbox-0.62.1.orig/data/menu.in Sat Jan 19 11:43:49 2002
+++ blackbox-0.62.1/data/menu.in Fri Feb 1 15:46:10 2002
@@ -57,24 +57,15 @@
[exec] (xterm) {xterm -ls}
[exec] (rxvt) {rxvt}
- [exec] (StarOffice) {soffice}
[exec] (XEmacs) {xemacs}
- [exec] (Acroread) {acroread}
+ [exec] (Emacs) {emacs}
+ [exec] (Console-Emacs) {xterm -e emacs -nw}
[submenu] (Graphics)
[exec] (The GIMP) {gimp}
[exec] (Image Magick) {display}
[end]
- [submenu] (Mozilla)
- [exec] (Mozilla Navigator) {mozilla}
- [submenu] (More...)
- [exec] (Mozilla Mail) {mozilla -mail}
- [exec] (Mozilla News) {mozilla -news}
- [exec] (Mozilla Composer) {mozilla -edit}
- [end]
- [end]
-
[submenu] (X Utilities)
[exec] (Xfontsel) {xfontsel}
[exec] (Xman) {xman}
@@ -95,6 +86,8 @@
[restart] (Start FVWM) {fvwm}
[restart] (Start WindowMaker) {wmaker}
[restart] (Start Afterstep) {afterstep}
+ [restart] (Start Oroborus) {oroborus}
+ [restart] (Start IceWM} {icewm}
[restart] (Start Enlightenment) {enlightenment}
[restart] (Start TWM) {twm}
[restart] (Start KWM) {kwm}
diff -Naur blackbox-0.62.1.orig/src/Screen.hh blackbox-0.62.1/src/Screen.hh
--- blackbox-0.62.1.orig/src/Screen.hh Tue Jan 8 23:51:02 2002
+++ blackbox-0.62.1/src/Screen.hh Fri Feb 1 15:47:14 2002
@@ -221,6 +221,7 @@
inline Workspace *getCurrentWorkspace(void) { return current_workspace; }
inline Workspacemenu *getWorkspacemenu(void) { return workspacemenu; }
+ inline Iconmenu *getIconmenu(void) { return iconmenu; }
inline const unsigned int &getHandleWidth(void) const
{ return resource.handle_width; }
diff -Naur blackbox-0.62.1.orig/src/Toolbar.cc blackbox-0.62.1/src/Toolbar.cc
--- blackbox-0.62.1.orig/src/Toolbar.cc Sat Jan 19 11:03:54 2002
+++ blackbox-0.62.1/src/Toolbar.cc Fri Feb 1 16:03:44 2002
@@ -341,28 +341,34 @@
frame.width, frame.height);
}
- XMoveResizeWindow(display, frame.workspace_label, frame.bevel_w,
- frame.bevel_w, frame.workspace_label_w,
- frame.label_h);
- XMoveResizeWindow(display, frame.psbutton, (frame.bevel_w * 2) +
- frame.workspace_label_w + 1, frame.bevel_w + 1,
+ // Set up widgets, from left to right:
+ XMoveResizeWindow(display, frame.clock, frame.bevel_w,
+ frame.bevel_w, frame.clock_w,
+ frame.label_h);
+
+ XMoveResizeWindow(display, frame.pwbutton, (frame.bevel_w * 2) +
+ frame.clock_w + 1, frame.bevel_w + 1,
frame.button_w, frame.button_w);
- XMoveResizeWindow(display ,frame.nsbutton, (frame.bevel_w * 3) +
- frame.workspace_label_w + frame.button_w + 2,
- frame.bevel_w + 1, frame.button_w, frame.button_w);
- XMoveResizeWindow(display, frame.window_label, (frame.bevel_w * 4) +
- (frame.button_w * 2) + frame.workspace_label_w + 3,
- frame.bevel_w, frame.window_label_w, frame.label_h);
- XMoveResizeWindow(display, frame.pwbutton, (frame.bevel_w * 5) +
- (frame.button_w * 2) + frame.workspace_label_w +
+ XMoveResizeWindow(display, frame.nwbutton, (frame.bevel_w * 3) +
+ frame.clock_w + frame.button_w + 2,
+ frame.bevel_w + 1, frame.button_w, frame.button_w);
+
+ XMoveResizeWindow(display, frame.window_label,
+ (frame.bevel_w * 4) + (frame.button_w * 2) + frame.clock_w + 3,
+ frame.bevel_w,
+ frame.window_label_w,
+ frame.label_h);
+
+ XMoveResizeWindow(display, frame.psbutton, (frame.bevel_w * 5) +
+ (frame.button_w * 2) + frame.clock_w +
frame.window_label_w + 4, frame.bevel_w + 1,
frame.button_w, frame.button_w);
- XMoveResizeWindow(display, frame.nwbutton, (frame.bevel_w * 6) +
- (frame.button_w * 3) + frame.workspace_label_w +
+ XMoveResizeWindow(display, frame.nsbutton, (frame.bevel_w * 6) +
+ (frame.button_w * 3) + frame.clock_w +
frame.window_label_w + 5, frame.bevel_w + 1,
frame.button_w, frame.button_w);
- XMoveResizeWindow(display, frame.clock, frame.width - frame.clock_w -
- frame.bevel_w, frame.bevel_w, frame.clock_w,
+ XMoveResizeWindow(display, frame.workspace_label, frame.width -
+frame.workspace_label_w -
+ frame.bevel_w, frame.bevel_w, frame.workspace_label_w,
frame.label_h);
Pixmap tmp = frame.base;
@@ -860,34 +866,59 @@
XClearWindow(display, frame.clock);
checkClock(True, True);
}
+#else
+ else if (be->window == frame.clock) {
+ // Show the root menu
+ popMenu(screen->getRootmenu(), be->x_root, be->y_root);
+ }
#endif // HAVE_STRFTIME
- else if (! on_top) {
+ // else if (! on_top) {
+ // Window w[1] = { frame.window };
+ // screen->raiseWindows(w, 1);
+ // }
+ else if (be->window==frame.workspace_label) {
+ // Clicks on workspace portion of taskbar bring up Workspaces menu
+ popMenu(screen->getWorkspacemenu(), be->x_root, be->y_root);
+
+ } else if (be->window==frame.window_label) {
+ // Clicks on label portion of toolbar bring up Icons menu
+ popMenu(screen->getIconmenu(), be->x_root, be->y_root);
+
+ }else if(be->window==frame.window){
+ // fprintf(stderr,"Toolbar click at %i,%i\n",be->x,be->y);
+
+ {
+ int ck_l, ck_r, wn_l, wn_r, ws_l, ws_r;
+ ck_l = frame.bevel_w; ck_r = ck_l + frame.clock_w;
+ // fprintf(stderr,"Clock region: %i-%i\n",ck_l,ck_r);
+
+ wn_l = (frame.bevel_w * 4) + (frame.button_w * 2) + frame.clock_w + 3;
+ wn_r = wn_l + frame.window_label_w;
+ // fprintf(stderr,"Wind. region: %i-%i\n",wn_l,wn_r);
+
+ ws_l = frame.width - frame.workspace_label_w - frame.bevel_w;
+ ws_r = ws_l + frame.workspace_label_w;
+ // fprintf(stderr,"Wksp. region: %i-%i\n",ws_l,ws_r);
+
+ if (be->x <= ck_r && be->x >= ck_l)
+ popMenu(screen->getRootmenu(), be->x_root, be->y_root);
+ else if (be->x <= wn_r && be->x >= wn_l)
+ popMenu(screen->getIconmenu(), be->x_root, be->y_root);
+ else if (be->x <= ws_r && be->x >= ws_l)
+ popMenu(screen->getWorkspacemenu(), be->x_root, be->y_root);
+
+ }
+ }
+
+ // Keep toolbar-raising behavior on left-click
+ if (! on_top) {
Window w[1] = { frame.window };
screen->raiseWindows(w, 1);
}
} else if (be->button == 2 && (! on_top)) {
XLowerWindow(display, frame.window);
} else if (be->button == 3) {
- if (! toolbarmenu->isVisible()) {
- int x, y;
-
- x = be->x_root - (toolbarmenu->getWidth() / 2);
- y = be->y_root - (toolbarmenu->getHeight() / 2);
-
- if (x < 0)
- x = 0;
- else if (x + toolbarmenu->getWidth() > screen->getWidth())
- x = screen->getWidth() - toolbarmenu->getWidth();
-
- if (y < 0)
- y = 0;
- else if (y + toolbarmenu->getHeight() > screen->getHeight())
- y = screen->getHeight() - toolbarmenu->getHeight();
-
- toolbarmenu->move(x, y);
- toolbarmenu->show();
- } else
- toolbarmenu->hide();
+ popMenu(toolbarmenu,be->x_root,be->y_root);
}
}
@@ -928,8 +959,10 @@
if (re->x >= 0 && re->x < (signed) frame.button_w &&
re->y >= 0 && re->y < (signed) frame.button_w)
screen->nextFocus();
- } else if (re->window == frame.window_label)
- screen->raiseFocus();
+ } else if (re->window == frame.window_label){
+ // If uncommented, will drop the toolbar's focus back below any occluding
+windows
+ //screen->raiseFocus();
+ }
#ifndef HAVE_STRFTIME
else if (re->window == frame.clock) {
XClearWindow(display, frame.clock);
@@ -1088,6 +1121,42 @@
clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000);
}
+// For display of menus based on toolbar clicks
+void Toolbar::popMenu(Basemenu *theMenu, int x_root, int y_root){
+ int thePosition;
+ Bool isTop;
+ thePosition = screen->getToolbarPlacement();
+
+ if (thePosition==TopLeft || thePosition==TopCenter || thePosition==TopRight){
+ isTop=True;
+ }else if(thePosition==BottomLeft || thePosition==BottomCenter ||
+thePosition==BottomRight){
+ isTop=False;
+ }
+
+ if (! theMenu->isVisible()) {
+ int x, y;
+
+ x = x_root - (theMenu->getWidth() / 2);
+ y = y_root - (theMenu->getHeight() / 2);
+
+ if (x < 0)
+ x = 0;
+ else if (x + theMenu->getWidth() > screen->getWidth())
+ x = screen->getWidth() - theMenu->getWidth();
+
+ if (isTop){
+ y = frame.height;
+ }else if (!isTop){
+ y = screen->getHeight() - theMenu->getHeight() -
+ frame.height - (2 * screen->getBorderWidth()) - 1;
+ }
+
+ theMenu->move(x, y);
+ theMenu->show();
+ } else {
+ theMenu->hide();
+ }
+}
void Toolbar::HideHandler::timeout(void) {
toolbar->hidden = ! toolbar->hidden;
diff -Naur blackbox-0.62.1.orig/src/Toolbar.hh blackbox-0.62.1/src/Toolbar.hh
--- blackbox-0.62.1.orig/src/Toolbar.hh Sat Jan 19 11:05:56 2002
+++ blackbox-0.62.1/src/Toolbar.hh Fri Feb 1 15:54:00 2002
@@ -130,6 +130,7 @@
void leaveNotifyEvent(XCrossingEvent *);
void exposeEvent(XExposeEvent *);
void keyPressEvent(XKeyEvent *);
+ void popMenu(Basemenu *theMenu, int x, int y);
void redrawWindowLabel(Bool = False);
void redrawWorkspaceLabel(Bool = False);
diff -Naur blackbox-0.62.1.orig/src/Window.cc blackbox-0.62.1/src/Window.cc
--- blackbox-0.62.1.orig/src/Window.cc Sat Jan 19 11:06:30 2002
+++ blackbox-0.62.1/src/Window.cc Fri Feb 1 15:56:30 2002
@@ -744,40 +744,48 @@
unsigned int bw = frame.button_w + frame.bevel_w + 1,
by = frame.bevel_w + 1, lx = by, lw = frame.width - by;
- if (decorations.iconify && frame.iconify_button != None) {
- XMoveResizeWindow(display, frame.iconify_button, by, by,
- frame.button_w, frame.button_h);
- XMapWindow(display, frame.iconify_button);
- XClearWindow(display, frame.iconify_button);
-
- lx += bw;
- lw -= bw;
- } else if (frame.iconify_button) {
- XUnmapWindow(display, frame.iconify_button);
- }
- int bx = frame.width - bw;
-
+ // Position Close Button
+ //
if (decorations.close && frame.close_button != None) {
- XMoveResizeWindow(display, frame.close_button, bx, by,
+ XMoveResizeWindow(display, frame.close_button, by, by,
frame.button_w, frame.button_h);
XMapWindow(display, frame.close_button);
XClearWindow(display, frame.close_button);
- bx -= bw;
+ lx += bw;
lw -= bw;
} else if (frame.close_button) {
XUnmapWindow(display, frame.close_button);
}
+
+ int bx = frame.width - bw;
+
+ // Position Maximize Button
+ //
if (decorations.maximize && frame.maximize_button != None) {
XMoveResizeWindow(display, frame.maximize_button, bx, by,
frame.button_w, frame.button_h);
XMapWindow(display, frame.maximize_button);
XClearWindow(display, frame.maximize_button);
+ bx -= bw;
lw -= bw;
} else if (frame.maximize_button) {
XUnmapWindow(display, frame.maximize_button);
}
+
+ // Position Iconify Button
+ //
+ if (decorations.iconify && frame.iconify_button != None) {
+ XMoveResizeWindow(display, frame.iconify_button, bx, by,
+ frame.button_w, frame.button_h);
+ XMapWindow(display, frame.iconify_button);
+ XClearWindow(display, frame.iconify_button);
+
+ lw -= bw;
+ } else if (frame.iconify_button)
+ XUnmapWindow(display, frame.iconify_button);
+
frame.label_w = lw - by;
XMoveResizeWindow(display, frame.label, lx, frame.bevel_w,
frame.label_w, frame.label_h);
diff -Naur blackbox-0.62.1.orig/src/i18n.hh blackbox-0.62.1/src/i18n.hh
--- blackbox-0.62.1.orig/src/i18n.hh Mon Jan 7 19:55:43 2002
+++ blackbox-0.62.1/src/i18n.hh Fri Feb 1 15:56:51 2002
@@ -38,6 +38,7 @@
}
#endif // HAVE_NL_TYPES_H
+typedef void *nl_catd;
class I18n {
private:
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits