- Japanese (ja_JP)
Hyun Suk Noh <tzesti@users.sourceforge.net>
- Korean (ko_KR)
- Wilbert Berendsen <wbsoft@xs4all.nl>
+ Artis Trops <hornet@navigator.lv>
+ - Latvian (lv_LV)
+ Wilbert Berendsen <wbsoft@xs4all.nl>
- Dutch (nl_NL)
Øyvind Stegard <oyvind.stegard@bluezone.no>
- Norwegian (no_NO)
2.2.0
* Bitmap buttons (Scott Moynes)
+2.1.1:
+ * A build fix for xftlsfonts. (Scott Moynes)
+
+ * Add a configuration menu for changing Xft font (Ben Jansens)
+ options, when Xft is compiled in.
+
2.1.0:
- * make alt-right-click resizing work on bottom window (Ben Jansens)
+ * Make alt-right-click resizing work on bottom window (Ben Jansens)
handles.
- * drop shadows for fonts, optional. (dropShadowFonts (Ben Jansens)
+ * Drop shadows for fonts, optional. (dropShadowFonts (Ben Jansens)
in the rc file).
* GNOME 2 Support. (Fixed problems with Gnome 2 (Ben Jansens)
ChangeLog from Blackbox (this code's previous project):
Changes from 0.62.1 to 0.65.0:
- - added Taiwan Chinese (zh_TW), Hungarian (hu_HU), Korean (ko_KR),
- Norwegian (no_NO), Polish (pl_PL), Romanian (ro_RO) and Ukrainian (uk_UA)
- nls files and updated most of the others.
+ - added Taiwan Chinese (zh_TW), Hungarian (hu_HU), Latvian (lv_LV),
+ Korean (ko_KR), Norwegian (no_NO), Polish (pl_PL), Romanian (ro_RO) and
+ Ukrainian (uk_UA) nls files and updated most of the others.
- added French man pages
- remove slit and netwm as compile time options
- strip much of BaseDisplay's original functionality and move it to the
AC_PATH_X
AC_PATH_XTRA
-test x$no_x = "xyes" && AC_MSG_ERROR([Openbox requires the X Window System libraries and headers.])
+test "$no_x" = "yes" && AC_MSG_ERROR([Openbox requires the X Window System libraries and headers.])
test x$x_includes = "x" && x_includes="/usr/include"
test x$x_libraries = "x" && x_libraries="/usr/lib"
LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
AC_MSG_CHECKING(for GCC)
-if test x$GCC = "xyes"; then
+if test "$GCC" = "yes"; then
AC_MSG_RESULT([yes])
CXXFLAGS="${CXXFLAGS} -Wall -W"
else
shape, [ --enable-shape enable support of the XShape extension [default=yes]])
: ${enableval="yes"}
-if test x$enableval = "xyes"; then
+if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
AC_CHECK_LIB(Xext, XShapeCombineShape,
AC_MSG_CHECKING([for X11/extensions/shape.h])
else
AC_MSG_RESULT([no])
fi
-if test x$SHAPE = "xyes"; then
+if test "$SHAPE" = "yes"; then
LIBS="$LIBS -lXext"
AC_DEFINE(SHAPE,1,Enable support of the XShape extension)
fi
AC_MSG_CHECKING([whether to build support for the Xinerama extension])
AC_ARG_ENABLE(
xinerama, [ --enable-xinerama enable support of the Xinerama extension [default=no]],
- if test x$enableval = "xyes"; then
+ if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
fi,
AC_MSG_RESULT([no])
)
-if test x$XINERAMA = "xyes"; then
+if test "$XINERAMA" = "yes"; then
AC_DEFINE(XINERAMA,1,Enable support of the Xinerama extension)
fi
dnl Check for Xft extension support and proper library files.
XFT=""
+XFT_UTF8=""
AC_MSG_CHECKING([whether to build support for the Xft extension])
AC_ARG_ENABLE(
xft, [ --enable-xft enable support of the Xft extension [default=yes]])
: ${enableval="yes"}
-if test x$enableval = "xyes"; then
+if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
AC_CHECK_LIB(Xft, XftFontOpenXlfd,
, XftFont foo,
AC_MSG_RESULT([yes])
XFT="yes"
- LIBS="$LIBS -lXft",
+ LIBS="$LIBS -lXft"
+
+ dnl Check for utf8 support in the Xft library
+ AC_CHECK_LIB(Xft, XftDrawStringUtf8,
+ XFT_UTF8="yes",
+ ),
+
AC_MSG_RESULT([no])
)
)
else
AC_MSG_RESULT([no])
fi
-if test x$XFT = "xyes"; then
- AC_DEFINE(XFT,1,Enable support of the Xft extension)
+if test "$XFT" = "yes"; then
+ AC_DEFINE(XFT,1,[Enable support of the Xft extension])
+ if test "$XFT_UTF8" = "yes"; then
+ AC_DEFINE(XFT_UTF8,1,[Support for Utf8 text in the Xft extension])
+ fi
fi
dnl Check for ordered 8bpp dithering
AC_ARG_ENABLE(ordered-pseudo,
[ --enable-ordered-pseudo include code for ordered pseudocolor (8bpp)
dithering [default=no]],
- if test x$enableval = "xyes"; then
+ if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
ORDEREDPSEUDO="yes"
else
fi,
AC_MSG_RESULT([no])
)
-if test x$ORDEREDPSEUDO = "xyes"; then
+if test "$ORDEREDPSEUDO" = "yes"; then
AC_DEFINE(ORDEREDPSEUDO,1,Enable pseudocolor ordered dithering)
fi
AC_MSG_CHECKING([whether to include verbose debugging code])
AC_ARG_ENABLE(debug,
[ --enable-debug include verbose debugging code [default=no]],
- if test x$enableval = "xyes"; then
+ if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
- if test x$GCC = "xyes"; then
+ if test "$GCC" = "yes"; then
DEBUG="-DDEBUG -fno-inline -g"
else
DEBUG="-DDEBUG"
AC_MSG_CHECKING([whether to include NLS support])
AC_ARG_ENABLE(nls,
[ --enable-nls include natural language support [default=yes]],
- if test x$enableval = "xyes"; then
+ if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
NLS="yes"
else
NLS=""
fi
-if test x$NLS = "xyes"; then
+if test "$NLS" = "yes"; then
AC_DEFINE(NLS,1,Include natural language support)
AC_SUBST(NLS)
fi
AC_ARG_ENABLE(
timed-cache,
[ --enable-timed-cache use timed pixmap cache [default=yes]],
- if test x$enableval = "xyes"; then
+ if test "$enableval" = "yes"; then
AC_MSG_RESULT([yes])
TIMEDCACHE="yes"
else
AC_MSG_RESULT([yes])
TIMEDCACHE="yes"
)
-if test x$TIMEDCACHE = "xyes"; then
+if test "$TIMEDCACHE" = "yes"; then
AC_DEFINE(TIMEDCACHE,1,Use timed pixmap cache)
fi
nls/it_IT/Makefile
nls/ja_JP/Makefile
nls/ko_KR/Makefile
+nls/lv_LV/Makefile
nls/no_NO/Makefile
nls/pl_PL/Makefile
nls/nl_NL/Makefile
# Window Maximizing
$ #XineramaSnapping
# Window Snapping
+$ #XftOptions
+# Xft Font Options
+$ #XftAA
+# Anti-Alias Text
+$ #XftShadow
+# Drop Shadows Under Text
# nls/Makefile.am for Blackbox - an X11 Window Manager
NLSTEST = @NLS@
-SUBDIRS = C da_DK de_DE es_AR es_ES et_EE fr_FR hu_HU it_IT ja_JP ko_KR nl_NL \
- no_NO pl_PL pt_BR ro_RO ru_RU sk_SK sl_SI sv_SE tr_TR uk_UA \
+SUBDIRS = C da_DK de_DE es_AR es_ES et_EE fr_FR hu_HU it_IT ja_JP ko_KR lv_LV \
+ nl_NL no_NO pl_PL pt_BR ro_RO ru_RU sk_SK sl_SI sv_SE tr_TR uk_UA \
zh_CN zh_TW
MAINTAINERCLEANFILES = Makefile.in blackbox-nls.hh
DISTCLEANFILES = blackbox-nls.hh
#include "Screen.hh"
Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
- setLabel(i18n(ConfigmenuSet, ConfigmenuConfigOptions, "Config options"));
+ setLabel(i18n(ConfigmenuSet, ConfigmenuConfigOptions, "Config Options"));
setInternalMenu();
focusmenu = new Focusmenu(this);
#ifdef XINERAMA
xineramamenu = new Xineramamenu(this);
#endif // XINERAMA
+#ifdef XFT
+ xftmenu = new Xftmenu(this);
+#endif // XFT
insert(i18n(ConfigmenuSet, ConfigmenuFocusModel,
"Focus Model"), focusmenu);
#ifdef XINERAMA
insert(i18n(ConfigmenuSet, ConfigmenuXineramaSupport,
"XineramaSupport"), xineramamenu);
+#endif // XINERAMA
+#ifdef XFT
+ insert(i18n(ConfigmenuSet, ConfigmenuXftOptions,
+ "Xft Font Options"), xftmenu);
#endif // XINERAMA
insert(i18n(ConfigmenuSet, ConfigmenuImageDithering,
"Image Dithering"), 1);
#ifdef XINERAMA
++index;
#endif // XINERAMA
+#ifdef XFT
+ ++index;
+#endif // XFT
setItemSelected(index++, getScreen()->doImageDither());
setItemSelected(index++, getScreen()->doOpaqueMove());
setItemSelected(index++, getScreen()->doWorkspaceWarping());
#ifdef XINERAMA
delete xineramamenu;
#endif // XINERAMA
+#ifdef XFT
+ delete xftmenu;
+#endif // XFT
}
#ifdef XINERAMA
xineramamenu->reconfigure();
#endif // XINERAMA
+#ifdef XFT
+ xftmenu->reconfigure();
+#endif // XFT
Basemenu::reconfigure();
}
}
}
#endif // XINERAMA
+
+#ifdef XFT
+Configmenu::Xftmenu::Xftmenu(Configmenu *cm):
+ Basemenu(cm->getScreen()) {
+ setLabel(i18n(ConfigmenuSet, ConfigmenuXftOptions, "Xft Font Options"));
+ setInternalMenu();
+
+ insert(i18n(ConfigmenuSet, ConfigmenuXftAA, "Anti-Alias Text"), 1);
+ insert(i18n(ConfigmenuSet, ConfigmenuXftShadow, "Drop Shadows Under Text"),
+ 2);
+
+ update();
+ setValues();
+}
+
+
+void Configmenu::Xftmenu::setValues(void) {
+ setItemSelected(0, getScreen()->doAAFonts());
+ setItemEnabled(1, getScreen()->doAAFonts());
+ setItemSelected(1, getScreen()->doShadowFonts());
+}
+
+
+void Configmenu::Xftmenu::reconfigure(void) {
+ setValues();
+ Basemenu::reconfigure();
+}
+
+
+void Configmenu::Xftmenu::itemSelected(int button, unsigned int index) {
+ if (button != 1)
+ return;
+
+ BasemenuItem *item = find(index);
+
+ if (! item->function())
+ return;
+
+ switch (item->function()) {
+ case 1: // anti-alias text
+ getScreen()->saveAAFonts(! getScreen()->doAAFonts());
+ break;
+
+ case 2: // drop shadows
+ getScreen()->saveShadowFonts(! getScreen()->doShadowFonts());
+ break;
+ }
+
+ setValues();
+}
+#endif // XFT
};
#endif // XINERAMA
+#ifdef XFT
+ class Xftmenu : public Basemenu {
+ private:
+ Xftmenu(const Xftmenu&);
+ Xftmenu& operator=(const Xftmenu&);
+
+ protected:
+ virtual void itemSelected(int button, unsigned int index);
+ virtual void setValues(void);
+
+ public:
+ Xftmenu(Configmenu *cm);
+ virtual void reconfigure(void);
+ };
+#endif // XFT
+
Focusmenu *focusmenu;
Placementmenu *placementmenu;
WindowToWindowSnapmenu *windowsnapmenu;
#ifdef XINERAMA
Xineramamenu *xineramamenu;
#endif // XINERAMA
+#ifdef XFT
+ Xftmenu *xftmenu;
+#endif // XFT
// friend class Focusmenu;
// friend class Placementmenu;
#ifdef XINERAMA
inline Basemenu *getXineramamenu(void) { return xineramamenu; }
#endif // XINERAMA
+#ifdef XFT
+ inline Basemenu *getXftmenu(void) { return xftmenu; }
+#endif // XFT
virtual void reconfigure(void);
};
c.color.alpha = 0x40 | 0x40 << 8; // transparent shadow
c.pixel = BlackPixel(_display, _screen->getScreenNumber());
-
- XftDrawStringUtf8(draw, &c, _xftfont, x + 1, _xftfont->ascent + y + 1,
- (XftChar8 *) string.c_str(), string.size());
+#ifdef XFT_UTF8
+ XftDrawStringUtf8(
+#else
+ XftDrawString8(
+#endif
+ draw, &c, _xftfont, x + 1, _xftfont->ascent + y + 1,
+ (XftChar8 *) string.c_str(), string.size());
}
XftColor c;
c.pixel = color.pixel();
c.color.alpha = 0xff | 0xff << 8; // no transparency in BColor yet
- XftDrawStringUtf8(draw, &c, _xftfont, x, _xftfont->ascent + y,
- (XftChar8 *) string.c_str(), string.size());
+#ifdef XFT_UTF8
+ XftDrawStringUtf8(
+#else
+ XftDrawString8(
+#endif
+ draw, &c, _xftfont, x, _xftfont->ascent + y,
+ (XftChar8 *) string.c_str(), string.size());
XftDrawDestroy(draw);
return;
#ifdef XFT
if (_xftfont) {
XGlyphInfo info;
- XftTextExtentsUtf8(_display, _xftfont, (XftChar8 *) string.c_str(),
- string.size(), &info);
+
+#ifdef XFT_UTF8
+ XftTextExtentsUtf8(
+#else
+ XftTextExtents8(
+#endif
+ _display, _xftfont, (XftChar8 *) string.c_str(),
+ string.size(), &info);
+
return info.xOff + (_shadow ? 1 : 0);
}
#endif // XFT
void BScreen::saveAAFonts(bool f) {
resource.aa_fonts = f;
- reconfigure();
config->setValue(screenstr + "antialiasFonts", resource.aa_fonts);
+ reconfigure();
}
void BScreen::saveShadowFonts(bool f) {
resource.shadow_fonts = f;
- reconfigure();
config->setValue(screenstr + "dropShadowFonts", resource.shadow_fonts);
+ reconfigure();
}
if (! config->getValue(screenstr + "opaqueMove", resource.opaque_move))
resource.opaque_move = false;
- if (! config->getValue(screenstr + "dropShadowFonts", resource.shadow_fonts))
- resource.shadow_fonts = false;
-
if (! config->getValue(screenstr + "antialiasFonts", resource.aa_fonts))
resource.aa_fonts = true;
+ if (! resource.aa_fonts ||
+ ! config->getValue(screenstr + "dropShadowFonts", resource.shadow_fonts))
+ resource.shadow_fonts = false;
+
if (! config->getValue(screenstr + "resizeZones", resource.resize_zones) ||
(resource.resize_zones != 1 && resource.resize_zones != 2 &&
resource.resize_zones != 4))
#ifdef XINERAMA
++bbwins;
#endif // XINERAMA
+#ifdef XFT
+ ++bbwins;
+#endif // XFT
Window *session_stack = new
Window[(num + workspacesList.size() + rootmenuList.size() +
#ifdef XINERAMA
*(session_stack + i++) = configmenu->getXineramamenu()->getWindowID();
#endif // XINERAMA
+#ifdef XFT
+ *(session_stack + i++) = configmenu->getXftmenu()->getWindowID();
+#endif // XFT
*(session_stack + i++) = configmenu->getWindowID();
*(session_stack + i++) = slit->getMenu()->getDirectionmenu()->getWindowID();
if (bw->isIconic()) {
iconmenu->changeItemLabel(bw->getWindowNumber(), bw->getIconTitle());
iconmenu->update();
- }
- else {
+ } else {
Clientmenu *clientmenu = getWorkspace(bw->getWorkspaceNumber())->getMenu();
clientmenu->changeItemLabel(bw->getWindowNumber(), bw->getTitle());
clientmenu->update();
}
-void BScreen::nextFocus(void) {
+void BScreen::nextFocus(void) const {
BlackboxWindow *focused = blackbox->getFocusedWindow(),
*next = focused;
- if (focused) {
- // if window is not on this screen, ignore it
- if (focused->getScreen()->getScreenNumber() != getScreenNumber())
- focused = (BlackboxWindow*) 0;
- }
-
- if (focused && current_workspace->getCount() > 1) {
- // next is the next window to recieve focus, current is a place holder
- BlackboxWindow *current;
+ if (focused &&
+ focused->getScreen()->getScreenNumber() == getScreenNumber() &&
+ current_workspace->getCount() > 1) {
do {
- current = next;
- next = current_workspace->getNextWindowInList(current);
- } while(! next->setInputFocus() && next != focused);
+ next = current_workspace->getNextWindowInList(next);
+ } while (next != focused && ! next->setInputFocus());
if (next != focused)
current_workspace->raiseWindow(next);
- } else if (current_workspace->getCount() >= 1) {
+ } else if (current_workspace->getCount() > 0) {
next = current_workspace->getTopWindowOnStack();
-
- current_workspace->raiseWindow(next);
next->setInputFocus();
+ current_workspace->raiseWindow(next);
}
}
-void BScreen::prevFocus(void) {
+void BScreen::prevFocus(void) const {
BlackboxWindow *focused = blackbox->getFocusedWindow(),
*next = focused;
if (focused->getScreen()->getScreenNumber() != getScreenNumber())
focused = (BlackboxWindow*) 0;
}
-
- if (focused && current_workspace->getCount() > 1) {
- // next is the next window to recieve focus, current is a place holder
- BlackboxWindow *current;
+
+ if (focused &&
+ focused->getScreen()->getScreenNumber() == getScreenNumber() &&
+ current_workspace->getCount() > 1) {
+ // next is the next window to receive focus, current is a place holder
do {
- current = next;
- next = current_workspace->getPrevWindowInList(current);
- } while(! next->setInputFocus() && next != focused);
+ next = current_workspace->getPrevWindowInList(next);
+ } while (next != focused && ! next->setInputFocus());
if (next != focused)
current_workspace->raiseWindow(next);
- } else if (current_workspace->getCount() >= 1) {
+ } else if (current_workspace->getCount() > 0) {
next = current_workspace->getTopWindowOnStack();
-
- current_workspace->raiseWindow(next);
next->setInputFocus();
+ current_workspace->raiseWindow(next);
}
}
-void BScreen::raiseFocus(void) {
+void BScreen::raiseFocus(void) const {
BlackboxWindow *focused = blackbox->getFocusedWindow();
if (! focused)
return;
}
-Workspace* BScreen::getWorkspace(unsigned int index) {
+Workspace* BScreen::getWorkspace(unsigned int index) const {
assert(index < workspacesList.size());
return workspacesList[index];
}
inline Slit *getSlit(void) { return slit; }
inline Toolbar *getToolbar(void) { return toolbar; }
- Workspace *getWorkspace(unsigned int index);
+ Workspace *getWorkspace(unsigned int index) const;
inline Workspace *getCurrentWorkspace(void) { return current_workspace; }
void reassociateWindow(BlackboxWindow *w, unsigned int wkspc_id,
bool ignore_sticky);
void propagateWindowName(const BlackboxWindow *bw);
- void prevFocus(void);
- void nextFocus(void);
- void raiseFocus(void);
+ void prevFocus(void) const;
+ void nextFocus(void) const;
+ void raiseFocus(void) const;
void load_rc(void);
void save_rc(void);
void reconfigure(void);
RectList availableAreas = screen->allAvailableAreas();
RectList::iterator it, end = availableAreas.end();
- for (it = availableAreas.begin(); it != end; ++it)
+ for (it = availableAreas.begin(); it != end; ++it) {
+ Rect r = *it;
+ r.setRect(r.x() + screen->getSnapOffset(),
+ r.y() + screen->getSnapOffset(),
+ r.width() - screen->getSnapOffset(),
+ r.height() - screen->getSnapOffset());
spaces.push_back(*it);
+ }
} else
#endif // XINERAMA
- spaces.push_back(screen->availableArea());
+ {
+ Rect r = screen->availableArea();
+ r.setRect(r.x() + screen->getSnapOffset(),
+ r.y() + screen->getSnapOffset(),
+ r.width() - screen->getSnapOffset(),
+ r.height() - screen->getSnapOffset());
+ spaces.push_back(r);
+ }
//Find Free Spaces
BlackboxWindowList::const_iterator wit = windowList.begin(),
cout << val.u.b;
break;
+#ifdef XFT_UTF8
case XftTypeMatrix:
cout << "xx(" << val.u.m->xx << ") ";
cout << "xy(" << val.u.m->xy << ") ";
cout << "yx(" << val.u.m->yx << ") ";
cout << "yy(" << val.u.m->yy << ")";
break;
+#endif
}
} while ((vallist = vallist->next));
cout << endl;