Xinerama
This commit is contained in:
parent
1022df4212
commit
e133cf83a3
6 changed files with 40 additions and 14 deletions
|
@ -22,6 +22,14 @@ changes for 0.1.8:
|
||||||
5 = Skip: lower tabs/shaded windows
|
5 = Skip: lower tabs/shaded windows
|
||||||
6 = Skip: stuck windows/shaded windows
|
6 = Skip: stuck windows/shaded windows
|
||||||
7 = Skip: lower tabs/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:
|
*02/03/11:
|
||||||
* Fixed some KDE stuff in Slit.cc (Thanks Tommi Komulainen)
|
* Fixed some KDE stuff in Slit.cc (Thanks Tommi Komulainen)
|
||||||
*02/03/08:
|
*02/03/08:
|
||||||
|
|
17
configure.in
17
configure.in
|
@ -241,6 +241,23 @@ AC_ARG_ENABLE(
|
||||||
)
|
)
|
||||||
AC_SUBST(GNOME)
|
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
|
dnl Determine the return type of signal handlers
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
// use GNU extensions
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
|
@ -454,28 +454,29 @@ ScreenInfo::~ScreenInfo(void) {
|
||||||
// x,y. If it fails or Xinerama isn't
|
// x,y. If it fails or Xinerama isn't
|
||||||
// activated it'll return head nr 0
|
// 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?
|
// is Xinerama extensions enabled?
|
||||||
if (hasXinerama()) {
|
if (hasXinerama()) {
|
||||||
// check if last head is still active
|
// 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].x_org +
|
||||||
xineramaInfos[xineramaLastHead].width) > x) &&
|
xineramaInfos[xineramaLastHead].width) > x) &&
|
||||||
(xineramaInfos[xineramaLastHead].y_org <= y) &&
|
(xineramaInfos[xineramaLastHead].y_org <= y) &&
|
||||||
((xineramaInfos[xineramaLastHead].y_org +
|
((xineramaInfos[xineramaLastHead].y_org +
|
||||||
xineramaInfos[xineramaLastHead].height) > y)) {
|
xineramaInfos[xineramaLastHead].height) > y)) {
|
||||||
return xineramaLastHead;
|
return xineramaLastHead;
|
||||||
} else {
|
} else { */
|
||||||
// go trough all the heads, and search
|
// go trough all the heads, and search
|
||||||
for (int i = 0; (signed) i < xineramaNumHeads; i++) {
|
for (int i = 0; (signed) i < xineramaNumHeads; i++) {
|
||||||
if (xineramaInfos[i].x_org <= x &&
|
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 <= y &&
|
||||||
xineramaInfos[i].y_org + xineramaInfos[i].height) > y)
|
(xineramaInfos[i].y_org + xineramaInfos[i].height) > y)
|
||||||
return (xineramaLastHead = i);
|
// return (xineramaLastHead = i);
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -506,7 +507,7 @@ unsigned int ScreenInfo::getCurrHead(void) const {
|
||||||
//----------- getHeadWidth ------------
|
//----------- getHeadWidth ------------
|
||||||
// Returns the width of head
|
// Returns the width of head
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
unsigned int ScreenInfo::getHeadWidth(unsigned int head) {
|
unsigned int ScreenInfo::getHeadWidth(unsigned int head) const {
|
||||||
|
|
||||||
if (hasXinerama()) {
|
if (hasXinerama()) {
|
||||||
if ((signed) head >= xineramaNumHeads) {
|
if ((signed) head >= xineramaNumHeads) {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
#ifndef BASEDISPLAY_HH
|
||||||
#define BASEDISPLAY_HH
|
#define BASEDISPLAY_HH
|
||||||
|
@ -172,8 +172,8 @@ public:
|
||||||
unsigned int getCurrHead(void) const;
|
unsigned int getCurrHead(void) const;
|
||||||
unsigned int getHeadWidth(unsigned int head) const;
|
unsigned int getHeadWidth(unsigned int head) const;
|
||||||
unsigned int getHeadHeight(unsigned int head) const;
|
unsigned int getHeadHeight(unsigned int head) const;
|
||||||
int getHeadX(unsigned int head);
|
int getHeadX(unsigned int head) const;
|
||||||
int getHeadY(unsigned int head);
|
int getHeadY(unsigned int head) const;
|
||||||
#endif // XINERAMA
|
#endif // XINERAMA
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -30,7 +30,7 @@ DEFAULT_KEYSFILE=$(pkgdatadir)/keys
|
||||||
DEFAULT_INITFILE=
|
DEFAULT_INITFILE=
|
||||||
|
|
||||||
CPPFLAGS= -Wall @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ \
|
CPPFLAGS= -Wall @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ \
|
||||||
@DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @KDE@ @GNOME@ \
|
@DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @KDE@ @GNOME@ @XINERAMA@ \
|
||||||
-DLOCALEPATH=\"$(pkgdatadir)/nls\" \
|
-DLOCALEPATH=\"$(pkgdatadir)/nls\" \
|
||||||
-DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
|
-DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
|
||||||
-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \
|
-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# util/Makefile.am for Blackbox 0.61.x - an X11 Window manager
|
# util/Makefile.am for Blackbox 0.61.x - an X11 Window manager
|
||||||
|
|
||||||
CPPFLAGS= @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @NEWWMSPEC@ @INTERLACE@ \
|
CPPFLAGS= @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @NEWWMSPEC@ @INTERLACE@ \
|
||||||
@ORDEREDPSEUDO@ @KDE@ @GNOME@
|
@ORDEREDPSEUDO@ @KDE@ @GNOME@ @XINERAMA@
|
||||||
|
|
||||||
bin_SCRIPTS = bsetbg
|
bin_SCRIPTS = bsetbg
|
||||||
bin_PROGRAMS = bsetroot
|
bin_PROGRAMS = bsetroot
|
||||||
|
|
Loading…
Reference in a new issue