Update to fluxbox-1.3.2

This commit is contained in:
dcoppa 2011-10-30 15:16:13 +00:00
parent 61efff188b
commit f0a47ff4e1
22 changed files with 34 additions and 699 deletions

View File

@ -1,10 +1,8 @@
# $OpenBSD: Makefile,v 1.56 2011/09/20 09:59:38 dcoppa Exp $
# $OpenBSD: Makefile,v 1.57 2011/10/30 15:16:13 dcoppa Exp $
COMMENT= window manager based on the original Blackbox code
DISTNAME= fluxbox-1.3.1
REVISION= 4
DISTNAME= fluxbox-1.3.2
CATEGORIES= x11
@ -27,7 +25,7 @@ WANTLIB= ICE Imlib2 SM X11 Xau Xdmcp Xext Xft Xinerama \
fribidi m pthread-stubs stdc++ xcb z
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.67
AUTOCONF_VERSION= 2.65
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"

View File

@ -1,5 +1,5 @@
MD5 (fluxbox-1.3.1.tar.gz) = +dh5Y+lXAm96pL56FfwVQQ==
RMD160 (fluxbox-1.3.1.tar.gz) = mxj6C2h4FOU27klf211FldUcV+k=
SHA1 (fluxbox-1.3.1.tar.gz) = zZ63bfHD4Ymoz6gTLp5YBdO+9gQ=
SHA256 (fluxbox-1.3.1.tar.gz) = AJQVZz/Ki4soZpFVeBR32xo1ja2qvm+Tv7HtCHvfo20=
SIZE (fluxbox-1.3.1.tar.gz) = 1094727
MD5 (fluxbox-1.3.2.tar.gz) = Uudt4K6W2MXoc3RmHQxxEg==
RMD160 (fluxbox-1.3.2.tar.gz) = 8dBPUsSjyH88VLjRIysQQVmiCE0=
SHA1 (fluxbox-1.3.2.tar.gz) = FbobnqrxcNh/pke3EYpjwF8JO1w=
SHA256 (fluxbox-1.3.2.tar.gz) = wXQDC9NW9oDcVgj1VTysibRPNiwFDQga6Ki3oyJygKA=
SIZE (fluxbox-1.3.2.tar.gz) = 1065005

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
Fix building with SEPARATE_BUILD
--- Makefile.in.orig Sun Feb 27 18:40:24 2011
+++ Makefile.in Mon Apr 18 19:50:45 2011
@@ -223,7 +223,7 @@ top_srcdir = @top_srcdir@
SUBDIRS = doc nls src util data
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in
ACLOCAL_AMFLAGS = -I .
-EXTRA_DIST = acinclude.m4 3rd/vim/* 3rd/vim/syntax/*
+EXTRA_DIST = acinclude.m4 $(top_srcdir)/3rd/vim/* $(top_srcdir)/3rd/vim/syntax/*
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-configure_in,v 1.5 2011/04/24 17:32:24 dcoppa Exp $
$OpenBSD: patch-configure_in,v 1.6 2011/10/30 15:16:13 dcoppa Exp $
Fix for our (older) fribidi port
--- configure.in.orig Sun Feb 27 18:40:00 2011
+++ configure.in Tue Apr 19 14:08:07 2011
@@ -613,7 +613,7 @@ if test "x$enableval" = "xyes"; then
--- configure.in.orig Sat Oct 29 15:46:15 2011
+++ configure.in Sun Oct 30 13:14:32 2011
@@ -610,7 +610,7 @@ if test "x$enableval" = "xyes"; then
AC_MSG_CHECKING([for fribidi/fribidi.h])
AC_TRY_COMPILE(
#include <fribidi/fribidi.h>

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-data_Makefile_in,v 1.5 2011/04/24 17:32:24 dcoppa Exp $
Fix building with SEPARATE_BUILD
--- data/Makefile.in.orig Sun Feb 27 18:40:21 2011
+++ data/Makefile.in Mon Apr 18 19:49:49 2011
@@ -590,19 +590,19 @@ all-local: menu init apps
install-pkgdataDATA:
@echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)"
$(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU))
- $(INSTALL_DATA) $(srcdir)/menu $(DESTDIR)$(DEFAULT_MENU)
+ $(INSTALL_DATA) $(builddir)/menu $(DESTDIR)$(DEFAULT_MENU)
@echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)"
$(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS))
$(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS)
@echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)"
$(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS))
- $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS)
+ $(INSTALL_DATA) $(builddir)/apps $(DESTDIR)$(DEFAULT_APPS)
@echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)"
$(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY))
$(INSTALL_DATA) $(srcdir)/overlay $(DESTDIR)$(DEFAULT_OVERLAY)
@echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)"
$(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT))
- $(INSTALL_DATA) $(srcdir)/init $(DESTDIR)$(DEFAULT_INIT)
+ $(INSTALL_DATA) $(builddir)/init $(DESTDIR)$(DEFAULT_INIT)
@echo "Installing windowmenu file in $(DESTDIR)$(DEFAULT_WINDOWMENU)"
$(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_WINDOWMENU))
$(INSTALL_DATA) $(srcdir)/windowmenu $(DESTDIR)$(DEFAULT_WINDOWMENU)

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-data_styles_MerleyKay,v 1.3 2011/04/24 17:32:24 dcoppa Exp $
Fix typo in 'MerleyKay' style
(commit 1237f83207ebb976deafade9f1b9cb452c38b467)
--- data/styles/MerleyKay.orig Wed Apr 13 20:34:58 2011
+++ data/styles/MerleyKay Wed Apr 13 20:35:28 2011
@@ -5,7 +5,7 @@
# by Pax, thanks!)
# update: added *.tab.* stuff to make fluxbox look real cool :)
-toolbar: Raised Gradient Veritcal
+toolbar: Raised Gradient Vertical
toolbar.color: rgb:62/70/85
toolbar.colorTo: rgb:56/66/75

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-src_ClientMenu_cc,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
Fix a crash when deiconifying apps
(commit a53017cc3bad26906b99ac473513a10847c40bc0)
--- src/ClientMenu.cc.orig Tue Apr 19 11:28:50 2011
+++ src/ClientMenu.cc Tue Apr 19 11:30:51 2011
@@ -52,15 +52,17 @@ class ClientMenuItem: public FbTk::MenuItem { (public)
return;
// this MenuItem object can get destroyed as a result of focus(), so we
- // must get a local copy of the parent menu
+ // must get a local copy of anything we want to use here
+ // AFTER ~ClientMenuItem() is called.
FbTk::Menu *parent = menu();
+ FocusControl& focus_control = m_client.screen().focusControl();
m_client.focus();
fbwin->raise();
if ((mods & ControlMask) == 0) {
// Ignore any focus changes due to this menu closing
// (even in StrictMouseFocus mode)
- m_client.screen().focusControl().ignoreAtPointer(true);
+ focus_control.ignoreAtPointer(true);
parent->hide();
}
}

View File

@ -1,43 +0,0 @@
$OpenBSD: patch-src_Ewmh_cc,v 1.5 2011/09/13 09:31:47 dcoppa Exp $
Fix a bug causing argb32 application icons to appear garbled
(upstream git commit 1da473bab9fa7b18ae925f8e084465c4c81bc3c9)
--- src/Ewmh.cc.orig Thu Feb 24 17:00:37 2011
+++ src/Ewmh.cc Mon Sep 12 20:57:19 2011
@@ -198,13 +198,23 @@ void extractNetWmIcon(Atom net_wm_icon, WinClient& win
Display* dpy = FbTk::App::instance()->display();
int scrn = winclient.screen().screenNumber();
+ // the icon will not be used by the client but by
+ // 'menu', 'iconbar', 'titlebar'. all these entities
+ // are created based upon the rootwindow and
+ // the default depth. if we would use winclient.depth()
+ // and winclient.drawable() here we might get into trouble
+ // (xfce4-terminal, skype .. 32bit visuals vs 24bit fluxbox
+ // entities)
+ Drawable parent = winclient.screen().rootWindow().drawable();
+ unsigned int depth = DefaultDepth(dpy, scrn);
+
// pick the smallest icon size atm
// TODO: find a better criteria
width = icon_data.begin()->first.first;
height = icon_data.begin()->first.second;
// tmp image for the pixmap
- XImage* img_pm = XCreateImage(dpy, DefaultVisual(dpy, scrn), winclient.depth(),
+ XImage* img_pm = XCreateImage(dpy, DefaultVisual(dpy, scrn), depth,
ZPixmap,
0, NULL, width, height, 32, 0);
if (!img_pm) {
@@ -280,8 +290,8 @@ void extractNetWmIcon(Atom net_wm_icon, WinClient& win
// the final icon
FbTk::PixmapWithMask icon;
- icon.pixmap() = FbTk::FbPixmap(winclient.drawable(), width, height, winclient.depth());
- icon.mask() = FbTk::FbPixmap(winclient.drawable(), width, height, 1);
+ icon.pixmap() = FbTk::FbPixmap(parent, width, height, depth);
+ icon.mask() = FbTk::FbPixmap(parent, width, height, 1);
FbTk::GContext gc_pm(icon.pixmap());
FbTk::GContext gc_mask(icon.mask());

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-src_FbTk_FbString_cc,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
$OpenBSD: patch-src_FbTk_FbString_cc,v 1.2 2011/10/30 15:16:13 dcoppa Exp $
Fixes for our (older) fribidi port
--- src/FbTk/FbString.cc.orig Wed Apr 13 12:12:03 2011
+++ src/FbTk/FbString.cc Wed Apr 13 12:12:45 2011
@@ -85,7 +85,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
--- src/FbTk/FbString.cc.orig Sat Oct 29 15:46:15 2011
+++ src/FbTk/FbString.cc Sun Oct 30 13:14:32 2011
@@ -88,7 +88,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
result.reserve(S4);
us.resize(S);
@ -13,7 +13,7 @@ Fixes for our (older) fribidi port
const_cast<char*>(src.c_str()), S - 1,
&us[0]);
@@ -93,7 +93,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
@@ -96,7 +96,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
fribidi_log2vis(&us[0], len, &base, &out_us[0], NULL, NULL, NULL);
result.resize(S4);

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-src_IconbarTool_cc,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
Fix icon width with vertical toolbar
(commit b1d70e2c92c15d79ff0128d932b4e245c706a634)
--- src/IconbarTool.cc.orig Tue Apr 19 11:36:37 2011
+++ src/IconbarTool.cc Tue Apr 19 11:38:04 2011
@@ -307,7 +307,7 @@ void IconbarTool::move(int x, int y) {
void IconbarTool::resize(unsigned int width, unsigned int height) {
m_icon_container.resize(width, height);
- m_icon_container.setMaxTotalSize(m_icon_container.orientation() == FbTk::ROT0 || m_icon_container.orientation() ? width : height);
+ m_icon_container.setMaxTotalSize(m_icon_container.orientation() == FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height);
renderTheme();
}
@@ -315,7 +315,7 @@ void IconbarTool::moveResize(int x, int y,
unsigned int width, unsigned int height) {
m_icon_container.moveResize(x, y, width, height);
- m_icon_container.setMaxTotalSize(m_icon_container.orientation() == FbTk::ROT0 || m_icon_container.orientation() ? width : height);
+ m_icon_container.setMaxTotalSize(m_icon_container.orientation() == FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height);
renderTheme();
}

View File

@ -1,136 +0,0 @@
$OpenBSD: patch-src_Keys_cc,v 1.1 2011/09/13 09:31:48 dcoppa Exp $
Bugfix: remap keysyms to keycodes after 'MappingNotify'
(upstream git commit ec6df5c3d19ed760f343d6755ad396b00ac8f4ea)
Bugfix: regrab ButtonMotionMask
(upstream git commit 0708d1e046f375a315baeae7c24903e4d5bf124d)
--- src/Keys.cc.orig Sat Sep 11 21:48:21 2010
+++ src/Keys.cc Tue Sep 13 09:31:01 2011
@@ -137,7 +137,7 @@ class Keys::t_key { (public)
typedef std::list<t_key*> keylist_t;
// constructor / destructor
- t_key(int type, unsigned int mod, unsigned int key, int context,
+ t_key(int type, unsigned int mod, unsigned int key, const char* key_str, int context,
bool isdouble);
t_key(t_key *k);
~t_key();
@@ -162,6 +162,7 @@ class Keys::t_key { (public)
int type; // KeyPress or ButtonPress
unsigned int mod;
unsigned int key; // key code or button number
+ std::string key_str; // key-symbol, needed for regrab()
int context; // ON_TITLEBAR, etc.: bitwise-or of all desired contexts
bool isdouble;
FbTk::RefCount<FbTk::Command<void> > m_command;
@@ -170,6 +171,7 @@ class Keys::t_key { (public)
};
Keys::t_key::t_key(int type_, unsigned int mod_, unsigned int key_,
+ const char* key_str_,
int context_, bool isdouble_) :
type(type_),
mod(mod_),
@@ -177,6 +179,10 @@ Keys::t_key::t_key(int type_, unsigned int mod_, unsig
context(context_),
isdouble(isdouble_),
m_command(0) {
+
+ if (key_str_) {
+ key_str.assign(key_str_);
+ }
context = context_ ? context_ : GLOBAL;
}
@@ -250,7 +256,7 @@ void Keys::grabButton(unsigned int button, unsigned in
for (; it != it_end; ++it) {
if ((context & it->second & ~Keys::ON_DESKTOP) > 0)
FbTk::KeyUtil::grabButton(button, mod, it->first,
- ButtonPressMask|ButtonReleaseMask);
+ ButtonPressMask|ButtonReleaseMask|ButtonMotionMask);
}
}
@@ -319,7 +325,7 @@ void Keys::reload() {
// free memory of previous grabs
deleteTree();
- m_map["default:"] = new t_key(0,0,0,0,false);
+ m_map["default:"] = new t_key(0,0,0,0,0,false);
unsigned int current_line = 0; //so we can tell the user where the fault is
@@ -349,7 +355,7 @@ void Keys::loadDefaults() {
fbdbg<<"Loading default key bindings"<<endl;
deleteTree();
- m_map["default:"] = new t_key(0,0,0,0,false);
+ m_map["default:"] = new t_key(0,0,0,0,0,false);
addBinding("OnDesktop Mouse1 :HideMenus");
addBinding("OnDesktop Mouse2 :WorkspaceMenu");
addBinding("OnDesktop Mouse3 :RootMenu");
@@ -389,7 +395,7 @@ bool Keys::addBinding(const string &linebuffer) {
argc++;
keyspace_t::iterator it = m_map.find(val[0]);
if (it == m_map.end())
- m_map[val[0]] = new t_key(0,0,0,0,false);
+ m_map[val[0]] = new t_key(0,0,0,0,0,false);
current_key = m_map[val[0]];
}
// for each argument
@@ -399,6 +405,8 @@ bool Keys::addBinding(const string &linebuffer) {
if (arg[0] != ':') { // parse key(s)
+ const char* key_str = 0;
+
int tmpmod = FbTk::KeyUtil::getModifier(arg.c_str());
if(tmpmod)
mod |= tmpmod; //If it's a modifier
@@ -462,6 +470,7 @@ bool Keys::addBinding(const string &linebuffer) {
} else if ((key = FbTk::KeyUtil::getKey(val[argc].c_str()))) { // convert from string symbol
type = KeyPress;
+ key_str = val[argc].c_str();
// keycode covers the following three two-byte cases:
// 0x - hex
@@ -484,13 +493,13 @@ bool Keys::addBinding(const string &linebuffer) {
current_key = current_key->find(type, mod, key, context,
isdouble);
if (!current_key) {
- first_new_key = new t_key(type, mod, key, context,
+ first_new_key = new t_key(type, mod, key, key_str, context,
isdouble);
current_key = first_new_key;
} else if (*current_key->m_command) // already being used
return false;
} else {
- t_key *temp_key = new t_key(type, mod, key, context,
+ t_key *temp_key = new t_key(type, mod, key, key_str, context,
isdouble);
current_key->keylist.push_back(temp_key);
current_key = temp_key;
@@ -654,10 +663,16 @@ void Keys::setKeyMode(t_key *keyMode) {
t_key::keylist_t::iterator it = keyMode->keylist.begin();
t_key::keylist_t::iterator it_end = keyMode->keylist.end();
for (; it != it_end; ++it) {
- if ((*it)->type == KeyPress)
- grabKey((*it)->key, (*it)->mod);
- else
- grabButton((*it)->key, (*it)->mod, (*it)->context);
+ t_key* t = *it;
+ if (t->type == KeyPress) {
+ if (!t->key_str.empty()) {
+ int key = FbTk::KeyUtil::getKey(t->key_str.c_str());
+ t->key = key;
+ }
+ grabKey(t->key, t->mod);
+ } else {
+ grabButton(t->key, t->mod, t->context);
+ }
}
m_keylist = keyMode;
}

View File

@ -1,14 +1,22 @@
$OpenBSD: patch-src_Makefile_in,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
$OpenBSD: patch-src_Makefile_in,v 1.2 2011/10/30 15:16:13 dcoppa Exp $
Don't check for git revision, this is a stable release
--- src/Makefile.in.orig Sun Feb 27 18:40:24 2011
+++ src/Makefile.in Mon Apr 18 20:04:45 2011
@@ -905,10 +905,8 @@ defaults.cc: force
--- src/Makefile.in.orig Sat Oct 29 15:49:04 2011
+++ src/Makefile.in Sun Oct 30 15:51:09 2011
@@ -896,7 +896,6 @@ defaults.hh: Makefile
defaults.cc: force
@( \
- GITDIR=$(top_srcdir)/.git; \
echo '#include "defaults.hh"'; \
echo ''; \
echo 'std::string realProgramName(const std::string& name) {'; \
@@ -904,10 +903,8 @@ defaults.cc: force
echo '}'; \
echo ''; \
echo 'const char* gitrevision() {'; \
- echo ' return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d ' ')`'";';\
- echo ' return "'`cat $$GITDIR/$$(cat $$GITDIR/HEAD | cut -f 2 -d ' ')`'";';\
- echo '}' ) > defaults_tmp.cc
- @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi
- @rm defaults_tmp.cc

View File

@ -1,70 +0,0 @@
$OpenBSD: patch-src_Screen_cc,v 1.6 2011/09/20 09:59:38 dcoppa Exp $
Use 'unsigned long' to feed XChangeProperty: fix crash at startup
on sparc64 (commit 870d4d02ee9085f1d0910db3f6e6838749d6a1ce)
Fix a use-after-free crash on restart/exit
(commit 0b6c860fa0067c73216209878ed1ae46f541f571)
Fix a bug in the BScreen constructor
(commit 3ad611928a86db3fdb4a8818da1394aa53eaeac7)
--- src/Screen.cc.orig Tue Sep 20 11:49:54 2011
+++ src/Screen.cc Tue Sep 20 11:50:28 2011
@@ -361,7 +361,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
// we're going to manage the screen, so now add our pid
#ifdef HAVE_GETPID
- pid_t bpid = getpid();
+ unsigned long bpid = static_cast<unsigned long>(getpid());
rootWindow().changeProperty(fluxbox->getFluxboxPidAtom(), XA_CARDINAL,
sizeof(pid_t) * 8, PropModeReplace,
@@ -376,7 +376,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
unsigned char *ret_prop;
if (rootWindow().property(wm_check, 0l, 1l,
False, XA_WINDOW, &xa_ret_type, &ret_format, &ret_nitems,
- &ret_bytes_after, &ret_prop) == Success) {
+ &ret_bytes_after, &ret_prop) ) {
m_restart = (ret_prop != NULL);
XFree(ret_prop);
}
@@ -504,6 +504,8 @@ BScreen::~BScreen() {
if (! managed)
return;
+ m_configmenu.reset(0);
+
m_toolbar.reset(0);
FbTk::EventManager *evm = FbTk::EventManager::instance();
@@ -573,6 +575,10 @@ BScreen::~BScreen() {
// slit must be destroyed before headAreas (Struts)
m_slit.reset(0);
+ delete m_rootmenu.release();
+ delete m_workspacemenu.release();
+ delete m_windowmenu.release();
+
// TODO fluxgen: check if this is the right place
for (size_t i = 0; i < m_head_areas.size(); i++)
delete m_head_areas[i];
@@ -1468,7 +1474,8 @@ void BScreen::rereadWindowMenu() {
void BScreen::addConfigMenu(const FbTk::FbString &label, FbTk::Menu &menu) {
m_configmenu_list.push_back(make_pair(label, &menu));
- setupConfigmenu(*m_configmenu.get());
+ if (m_configmenu.get())
+ setupConfigmenu(*m_configmenu.get());
}
void BScreen::removeConfigMenu(FbTk::Menu &menu) {
@@ -1479,7 +1486,7 @@ void BScreen::removeConfigMenu(FbTk::Menu &menu) {
if (erase_it != m_configmenu_list.end())
m_configmenu_list.erase(erase_it);
- if (!isShuttingdown())
+ if (!isShuttingdown() && m_configmenu.get())
setupConfigmenu(*m_configmenu.get());
}

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_Screen_hh,v 1.1 2011/04/28 09:52:48 dcoppa Exp $
Do not warp workspaces with only one workspace
(commit be90145227ca5cb9b54547ccb3905419f4d4f9d9)
--- src/Screen.hh.orig Thu Apr 28 11:17:30 2011
+++ src/Screen.hh Thu Apr 28 11:18:47 2011
@@ -101,7 +101,7 @@ class BScreen: public FbTk::EventHandler, public FbTk:
bool isRootColormapInstalled() const { return root_colormap_installed; }
bool isScreenManaged() const { return managed; }
- bool isWorkspaceWarping() const { return *resource.workspace_warping; }
+ bool isWorkspaceWarping() const { return (m_workspaces_list.size() > 1) && *resource.workspace_warping; }
bool doAutoRaise() const { return *resource.auto_raise; }
bool clickRaises() const { return *resource.click_raises; }
bool doOpaqueMove() const { return *resource.opaque_move; }

View File

@ -1,94 +0,0 @@
$OpenBSD: patch-src_TextDialog_cc,v 1.1 2011/05/23 09:13:36 dcoppa Exp $
Fixes for TextDialog and ToolTipWindow style rendering bugs
(commits fd6fbb80e7a6c1d62d696a4f598edc1101b13194 and
822c02e96a88a90540fa622afa5ab196b9ba5a7c)
--- src/TextDialog.cc.orig Sun May 22 19:28:13 2011
+++ src/TextDialog.cc Sun May 22 19:28:33 2011
@@ -44,7 +44,7 @@ TextDialog::TextDialog(BScreen &screen,
const string &title) :
FbTk::FbWindow(screen.rootWindow().screenNumber(), 0, 0, 200, 1, ExposureMask),
m_textbox(*this, screen.focusedWinFrameTheme()->font(), ""),
- m_label(*this, screen.focusedWinFrameTheme()->font(), title),
+ m_label(*this, screen.focusedWinFrameTheme()->iconbarTheme().text().font(), title),
m_gc(m_textbox),
m_screen(screen),
m_move_x(0),
@@ -135,19 +135,28 @@ void TextDialog::keyPressEvent(XKeyEvent &event) {
}
void TextDialog::render() {
- Pixmap tmp = m_pixmap;
- if (!m_screen.focusedWinFrameTheme()->iconbarTheme().texture().usePixmap()) {
- m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->iconbarTheme().texture().color());
- m_pixmap = 0;
+ if (m_screen.focusedWinFrameTheme()->iconbarTheme().texture().type() &
+ FbTk::Texture::PARENTRELATIVE) {
+ if (!m_screen.focusedWinFrameTheme()->titleTexture().usePixmap()) {
+ m_pixmap = None;
+ m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->titleTexture().color());
+ } else {
+ m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(),
+ m_screen.focusedWinFrameTheme()->titleTexture());
+ m_label.setBackgroundPixmap(m_pixmap);
+ }
} else {
- m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(),
- m_screen.focusedWinFrameTheme()->iconbarTheme().texture());
- m_label.setBackgroundPixmap(m_pixmap);
+ if (!m_screen.focusedWinFrameTheme()->iconbarTheme().texture().usePixmap()) {
+ m_pixmap = None;
+ m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->iconbarTheme().texture().color());
+ } else {
+ m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(),
+ m_screen.focusedWinFrameTheme()->iconbarTheme().texture());
+ m_label.setBackgroundPixmap(m_pixmap);
+ }
}
-
- if (tmp)
- m_screen.imageControl().removeImage(tmp);
-
+ if (m_pixmap)
+ m_screen.imageControl().removeImage(m_pixmap);
}
void TextDialog::init() {
@@ -156,6 +165,7 @@ void TextDialog::init() {
// we listen to motion notify too
m_label.setEventMask(m_label.eventMask() | ButtonPressMask | ButtonMotionMask);
m_label.setGC(m_screen.focusedWinFrameTheme()->iconbarTheme().text().textGC());
+ m_label.setJustify(m_screen.focusedWinFrameTheme()->iconbarTheme().text().justify());
m_label.show();
// setup text box
@@ -167,11 +177,15 @@ void TextDialog::init() {
m_textbox.show();
// setup this window
- setBorderWidth(1);
- setBackgroundColor(white);
- // move to center of the screen
- move((m_screen.width() - width())/2, (m_screen.height() - height())/2);
+ setBorderWidth(m_screen.focusedWinFrameTheme()->border().width());
+ setBorderColor(m_screen.focusedWinFrameTheme()->border().color());
+ // move to center of the current head
+ unsigned int head = m_screen.getCurrHead();
+ move(m_screen.getHeadX(head) + (m_screen.getHeadWidth(head) - width()) / 2,
+ m_screen.getHeadY(head) + (m_screen.getHeadHeight(head) - height()) / 2);
+
+
updateSizes();
resize(width(), m_textbox.height() + m_label.height());
@@ -185,6 +199,6 @@ void TextDialog::updateSizes() {
m_label.moveResize(0, 0,
width(), m_textbox.font().height() + 2);
- m_textbox.moveResize(2, m_label.height(),
- width() - 4, m_textbox.font().height() + 2);
+ m_textbox.moveResize(0, m_label.height(),
+ width(), m_textbox.font().height() + 2);
}

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-src_ToolFactory_cc,v 1.1 2011/09/13 09:31:48 dcoppa Exp $
Bugfix: do not change workspaces when using NextWindow / PrevWindow
buttons in toolbar (commit 6c82cd5f8450dbd3f27f14d19bf5e23a77053d2f)
--- src/ToolFactory.cc.orig Tue Sep 13 09:39:51 2011
+++ src/ToolFactory.cc Tue Sep 13 09:49:28 2011
@@ -91,14 +91,19 @@ ToolbarItem *ToolFactory::create(const std::string &na
} else if (name == "clock") {
item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu());
} else {
- FbTk::RefCount<FbTk::Command<void> > cmd(FbTk::CommandParser<void>::instance().parse(name));
+
+ std::string cmd_str = name;
+ if (name == "prevwindow" || name == "nextwindow") {
+ cmd_str += " (workspace=[current])";
+ }
+
+ FbTk::RefCount<FbTk::Command<void> > cmd(FbTk::CommandParser<void>::instance().parse(cmd_str));
if (*cmd == 0) // we need a command
return 0;
// TODO maybe direction of arrows should depend on toolbar layout ?
FbTk::FbDrawable::TriangleType arrow_type = FbTk::FbDrawable::RIGHT;
- const char *tmp = name.c_str();
- if (FbTk::StringUtil::strcasestr(tmp, "prev"))
+ if (name.find("prev") != std::string::npos)
arrow_type = FbTk::FbDrawable::LEFT;
ArrowButton *win = new ArrowButton(arrow_type, parent,

View File

@ -1,26 +0,0 @@
$OpenBSD: patch-src_Toolbar_cc,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
Fix: toolbar placement from menu not saved correctly into configfile
(commit bb2ce5df8a814f9b858b6919356f7d37f10e6b9f)
--- src/Toolbar.cc.orig Tue Apr 19 11:26:52 2011
+++ src/Toolbar.cc Tue Apr 19 11:28:26 2011
@@ -101,8 +101,8 @@ const ToolbarPlacementString placement_strings[] = {
{ Toolbar::LEFTBOTTOM, "LeftBottom" },
{ Toolbar::LEFTCENTER, "LeftCenter" },
{ Toolbar::LEFTTOP, "LeftTop" },
- { Toolbar::RIGHTCENTER, "RightCenter" },
{ Toolbar::RIGHTBOTTOM, "RightBottom" },
+ { Toolbar::RIGHTCENTER, "RightCenter" },
{ Toolbar::RIGHTTOP, "RightTop" }
};
@@ -116,7 +116,7 @@ getString() const {
size_t i = (m_value == FbTk::Util::clamp(m_value, Toolbar::TOPLEFT, Toolbar::RIGHTTOP)
? m_value
- : Toolbar::DEFAULT) - 1;
+ : Toolbar::DEFAULT) - Toolbar::TOPLEFT;
return placement_strings[i].str;
}

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-src_TooltipWindow_cc,v 1.1 2011/05/23 09:13:36 dcoppa Exp $
Fixes for TextDialog and ToolTipWindow style rendering bugs
(commits fd6fbb80e7a6c1d62d696a4f598edc1101b13194 and
822c02e96a88a90540fa622afa5ab196b9ba5a7c)
--- src/TooltipWindow.cc.orig Thu Sep 9 14:39:18 2010
+++ src/TooltipWindow.cc Sun May 22 19:20:51 2011
@@ -55,8 +55,8 @@ void TooltipWindow::raiseTooltip() {
resize(m_lastText);
reconfigTheme();
- int h = theme()->font().height() + theme()->bevelWidth() * 2;
- int w = theme()->font().textWidth(m_lastText) + theme()->bevelWidth() * 2;
+ int h = theme()->iconbarTheme().text().font().height() + theme()->bevelWidth() * 2;
+ int w = theme()->iconbarTheme().text().font().textWidth(m_lastText) + theme()->bevelWidth() * 2;
Window root_ret; // not used
Window window_ret; // not used
@@ -90,11 +90,11 @@ void TooltipWindow::raiseTooltip() {
show();
clear();
- theme()->font().drawText(*this, screen().screenNumber(),
+ theme()->iconbarTheme().text().font().drawText(*this, screen().screenNumber(),
theme()->iconbarTheme().text().textGC(),
m_lastText,
theme()->bevelWidth(),
- theme()->bevelWidth() + theme()->font().ascent());
+ theme()->bevelWidth() + theme()->iconbarTheme().text().font().ascent());
}
void TooltipWindow::updateText(const FbTk::BiDiString& text) {

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-src_main_cc,v 1.1 2011/09/13 09:31:48 dcoppa Exp $
Fix a race condition between copying the default config files
to ~/.fluxbox/ and executing 'fluxbox-update_configs'
(upstream git commit f9df3ffedafe4ee36a74949958527ecc0c23c841)
--- src/main.cc.orig Thu Feb 24 17:00:37 2011
+++ src/main.cc Tue Sep 13 10:23:38 2011
@@ -52,6 +52,10 @@
#include <string.h>
#endif
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
#ifdef HAVE_SYS_STAT_H
#include <sys/types.h>
#include <sys/stat.h>
@@ -365,13 +369,19 @@ void setupConfigFiles(const std::string& dirname, cons
}
}
+ bool sync_fs = false;
+
// copy default files if needed
for (size_t i = 0; i < nr_of_cfiles; ++i) {
if (cfiles[i].create_file) {
FbTk::FileUtil::copyFile(cfiles[i].default_name, cfiles[i].filename.c_str());
+ sync_fs = true;
}
}
+ if (sync_fs) {
+ sync();
+ }
}
@@ -408,6 +418,7 @@ void updateConfigFilesIfNeeded(const std::string& rc_f
<< commandargs
<< "' failed." << endl;
}
+ sync();
}
}

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-util_fluxbox-generate_menu_in,v 1.7 2011/04/24 17:32:24 dcoppa Exp $
$OpenBSD: patch-util_fluxbox-generate_menu_in,v 1.8 2011/10/30 15:16:13 dcoppa Exp $
Adapt to our non-GNU grep
--- util/fluxbox-generate_menu.in.orig Thu Sep 9 14:39:18 2010
+++ util/fluxbox-generate_menu.in Tue Apr 19 14:19:02 2011
@@ -308,7 +308,7 @@ searchForIcon(){
--- util/fluxbox-generate_menu.in.orig Sat Oct 29 15:46:15 2011
+++ util/fluxbox-generate_menu.in Sun Oct 30 13:14:32 2011
@@ -330,7 +330,7 @@ searchForIcon(){
# echo "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>"
if [ -f "$entry_icon" ]; then
# if icon exists and entry does not already exists, add it

View File

@ -1,49 +0,0 @@
$OpenBSD: patch-util_fluxbox-remote_cc,v 1.1 2011/05/11 10:05:42 dcoppa Exp $
Fix handling of exit codes
(commit 2f166eb4aeb5d77407e9380d644215cd5e94d592)
--- util/fluxbox-remote.cc.orig Sun Oct 4 21:45:41 2009
+++ util/fluxbox-remote.cc Wed May 11 11:01:35 2011
@@ -25,6 +25,14 @@
#include <stdlib.h>
#include <stdio.h>
+bool g_gotError;
+static int HandleIPCError(Display *disp, XErrorEvent*ptr)
+{
+ // ptr->error_code contains the actual error flags
+ g_gotError=true;
+ return( 0 );
+}
+
int main(int argc, char **argv) {
if (argc <= 1) {
@@ -42,14 +50,21 @@ int main(int argc, char **argv) {
Window root = DefaultRootWindow(disp);
char *str = argv[1];
- int ret = XChangeProperty(disp, root, fbcmd_atom,
+
+ typedef int (*x_error_handler_t)(Display*,XErrorEvent*);
+
+ // assign the custom handler, clear the flag, sync the data, then check it for success/failure
+ x_error_handler_t handler = XSetErrorHandler( HandleIPCError );
+ g_gotError=false;
+ XChangeProperty(disp, root, fbcmd_atom,
XA_STRING, 8, PropModeReplace,
(unsigned char *) str, strlen(str));
+ XSync(disp,False);
+ int ret=(g_gotError?EXIT_FAILURE:EXIT_SUCCESS);
+ XSetErrorHandler(handler);
+
XCloseDisplay(disp);
- if (ret == Success)
- return EXIT_SUCCESS;
-
- return EXIT_FAILURE;
+ return ret;
}

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-util_fluxbox-update_configs_cc,v 1.1 2011/04/24 17:32:24 dcoppa Exp $
Fix building with SEPARATE_BUILD
--- util/fluxbox-update_configs.cc.orig Sat Sep 18 17:51:51 2010
+++ util/fluxbox-update_configs.cc Mon Apr 18 17:28:19 2011
@@ -24,7 +24,7 @@
#include "../src/FbTk/StringUtil.hh"
#include "../src/FbTk/FileUtil.hh"
-#include "defaults.hh"
+#include "../src/defaults.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"