diff --git a/ChangeLog b/ChangeLog index 136c16df..37a28717 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,14 @@ changes for 0.1.8: 5 = Skip: lower tabs/shaded windows 6 = Skip: stuck windows/shaded windows 7 = Skip: lower tabs/stuck windows/shaded windows +*02/03/15: + * Xinerama support, maximizes windows to the current heads size, places + windows on the current head, makes it possible to place toolbar on + the different heads, also possible with the slit. Menus will be placed + on the current head too. (Claes Nästen) +*02/03/13: + * Fixed window placement, now tabs are taking in account. Also, + no spaced are put inbetween windows to save space. (Claes Nästen) *02/03/11: * Fixed some KDE stuff in Slit.cc (Thanks Tommi Komulainen) *02/03/08: diff --git a/configure.in b/configure.in index d710bc75..bee2bd0d 100644 --- a/configure.in +++ b/configure.in @@ -241,6 +241,23 @@ AC_ARG_ENABLE( ) AC_SUBST(GNOME) +dnl Check for Xinerama support +XINERAMA="" +AC_MSG_CHECKING([whether to build support for the Xinerama extension]) +AC_ARG_ENABLE(xinerama, +[ --enable-xinerama enable xinerama extension [default=no]], , [enable_xinerama=no]) + +if test "x$enable_xinerama" = "xyes"; then + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(Xinerama, XineramaQueryScreens, + XINERAMA="-DXINERAMA"; Xinerama_libs="-lXinerama", ) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(XINERAMA) + +LIBS="$LIBS $Xinerama_libs" + dnl Determine the return type of signal handlers AC_TYPE_SIGNAL diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc index cb3ca28e..d92c5330 100644 --- a/src/BaseDisplay.cc +++ b/src/BaseDisplay.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: BaseDisplay.cc,v 1.10 2002/03/19 21:19:55 fluxgen Exp $ +// $Id: BaseDisplay.cc,v 1.11 2002/03/23 02:02:00 pekdon Exp $ // use GNU extensions #ifndef _GNU_SOURCE @@ -454,28 +454,29 @@ ScreenInfo::~ScreenInfo(void) { // x,y. If it fails or Xinerama isn't // activated it'll return head nr 0 //----------------------------------------- -unsigned int ScreenInfo::getHead(int x, int y) { +unsigned int ScreenInfo::getHead(int x, int y) const { // is Xinerama extensions enabled? if (hasXinerama()) { // check if last head is still active - if ((xineramaInfos[xineramaLastHead].x_org <= x) && +/* if ((xineramaInfos[xineramaLastHead].x_org <= x) && ((xineramaInfos[xineramaLastHead].x_org + xineramaInfos[xineramaLastHead].width) > x) && (xineramaInfos[xineramaLastHead].y_org <= y) && ((xineramaInfos[xineramaLastHead].y_org + xineramaInfos[xineramaLastHead].height) > y)) { return xineramaLastHead; - } else { + } else { */ // go trough all the heads, and search for (int i = 0; (signed) i < xineramaNumHeads; i++) { if (xineramaInfos[i].x_org <= x && - xineramaInfos[i].x_org + xineramaInfos[i].width) > x && + (xineramaInfos[i].x_org + xineramaInfos[i].width) > x && xineramaInfos[i].y_org <= y && - xineramaInfos[i].y_org + xineramaInfos[i].height) > y) - return (xineramaLastHead = i); + (xineramaInfos[i].y_org + xineramaInfos[i].height) > y) + // return (xineramaLastHead = i); + return i; } - } + // } } return 0; @@ -506,7 +507,7 @@ unsigned int ScreenInfo::getCurrHead(void) const { //----------- getHeadWidth ------------ // Returns the width of head //------------------------------------- -unsigned int ScreenInfo::getHeadWidth(unsigned int head) { +unsigned int ScreenInfo::getHeadWidth(unsigned int head) const { if (hasXinerama()) { if ((signed) head >= xineramaNumHeads) { diff --git a/src/BaseDisplay.hh b/src/BaseDisplay.hh index d7075c15..30e90c06 100644 --- a/src/BaseDisplay.hh +++ b/src/BaseDisplay.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: BaseDisplay.hh,v 1.17 2002/03/19 21:19:55 fluxgen Exp $ +// $Id: BaseDisplay.hh,v 1.18 2002/03/23 02:02:01 pekdon Exp $ #ifndef BASEDISPLAY_HH #define BASEDISPLAY_HH @@ -172,8 +172,8 @@ public: unsigned int getCurrHead(void) const; unsigned int getHeadWidth(unsigned int head) const; unsigned int getHeadHeight(unsigned int head) const; - int getHeadX(unsigned int head); - int getHeadY(unsigned int head); + int getHeadX(unsigned int head) const; + int getHeadY(unsigned int head) const; #endif // XINERAMA private: diff --git a/src/Makefile.am b/src/Makefile.am index 0d71fa3a..6d0d2010 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,7 +30,7 @@ DEFAULT_KEYSFILE=$(pkgdatadir)/keys DEFAULT_INITFILE= CPPFLAGS= -Wall @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ \ -@DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @KDE@ @GNOME@ \ +@DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @KDE@ @GNOME@ @XINERAMA@ \ -DLOCALEPATH=\"$(pkgdatadir)/nls\" \ -DDEFAULTMENU=\"$(DEFAULT_MENU)\" \ -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \ diff --git a/util/Makefile.am b/util/Makefile.am index 20123cb1..773c43c8 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,7 +1,7 @@ # util/Makefile.am for Blackbox 0.61.x - an X11 Window manager CPPFLAGS= @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @NEWWMSPEC@ @INTERLACE@ \ -@ORDEREDPSEUDO@ @KDE@ @GNOME@ +@ORDEREDPSEUDO@ @KDE@ @GNOME@ @XINERAMA@ bin_SCRIPTS = bsetbg bin_PROGRAMS = bsetroot