mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-31 13:05:52 +01:00
- Fixed Window Maker to compile with xinerama disabled.
- Replaced --disable-xinerama with --enable-xinerama in configure (xinerama needs to be enabled when Window Maker is build because it's no longer enabled by default)
This commit is contained in:
@@ -526,10 +526,10 @@ fi
|
|||||||
|
|
||||||
dnl XINERAMA support
|
dnl XINERAMA support
|
||||||
dnl ================
|
dnl ================
|
||||||
xinerama=yes
|
xinerama=no
|
||||||
AC_ARG_ENABLE(xinerama,
|
AC_ARG_ENABLE(xinerama,
|
||||||
[ --disable-xinerama disable XInerama extension support],
|
[ --enable-xinerama enable Xinerama extension support],
|
||||||
xinerama=$enableval, xinerama=yes)
|
xinerama=$enableval, xinerama=no)
|
||||||
|
|
||||||
if test "$xinerama" = yes; then
|
if test "$xinerama" = yes; then
|
||||||
AC_CHECK_LIB(Xinerama, XineramaQueryScreens, [XLIBS="-lXinerama $XLIBS"
|
AC_CHECK_LIB(Xinerama, XineramaQueryScreens, [XLIBS="-lXinerama $XLIBS"
|
||||||
|
|||||||
@@ -35,18 +35,20 @@
|
|||||||
#include <X11/extensions/Xinerama.h>
|
#include <X11/extensions/Xinerama.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void wInitXinerama(WScreen *scr)
|
void
|
||||||
|
wInitXinerama(WScreen *scr)
|
||||||
{
|
{
|
||||||
scr->xine_screens = 0;
|
scr->xine_primary_head = 0;
|
||||||
scr->xine_count = 0;
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
scr->xine_screens = XineramaQueryScreens(dpy, &scr->xine_count);
|
scr->xine_screens = XineramaQueryScreens(dpy, &scr->xine_count);
|
||||||
|
#else
|
||||||
|
scr->xine_count = 0;
|
||||||
#endif
|
#endif
|
||||||
scr->xine_primary_head = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wGetRectPlacementInfo(WScreen *scr, WMRect rect, int *flags)
|
int
|
||||||
|
wGetRectPlacementInfo(WScreen *scr, WMRect rect, int *flags)
|
||||||
{
|
{
|
||||||
int best;
|
int best;
|
||||||
unsigned long area, totalArea;
|
unsigned long area, totalArea;
|
||||||
@@ -111,8 +113,10 @@ int wGetRectPlacementInfo(WScreen *scr, WMRect rect, int *flags)
|
|||||||
|
|
||||||
|
|
||||||
/* get the head that covers most of the rectangle */
|
/* get the head that covers most of the rectangle */
|
||||||
int wGetHeadForRect(WScreen *scr, WMRect rect)
|
int
|
||||||
|
wGetHeadForRect(WScreen *scr, WMRect rect)
|
||||||
{
|
{
|
||||||
|
#ifdef XINERAMA
|
||||||
int best;
|
int best;
|
||||||
unsigned long area;
|
unsigned long area;
|
||||||
int i;
|
int i;
|
||||||
@@ -127,7 +131,6 @@ int wGetHeadForRect(WScreen *scr, WMRect rect)
|
|||||||
best = -1;
|
best = -1;
|
||||||
area = 0;
|
area = 0;
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
for (i = 0; i < scr->xine_count; i++) {
|
for (i = 0; i < scr->xine_count; i++) {
|
||||||
unsigned long a;
|
unsigned long a;
|
||||||
|
|
||||||
@@ -156,7 +159,8 @@ int wGetHeadForRect(WScreen *scr, WMRect rect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wGetHeadForWindow(WWindow *wwin)
|
int
|
||||||
|
wGetHeadForWindow(WWindow *wwin)
|
||||||
{
|
{
|
||||||
WMRect rect;
|
WMRect rect;
|
||||||
|
|
||||||
@@ -209,7 +213,8 @@ int wGetHeadForPoint(WScreen *scr, WMPoint point, int *flags)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int wGetHeadForPoint(WScreen *scr, WMPoint point)
|
int
|
||||||
|
wGetHeadForPoint(WScreen *scr, WMPoint point)
|
||||||
{
|
{
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
int i;
|
int i;
|
||||||
@@ -226,7 +231,8 @@ int wGetHeadForPoint(WScreen *scr, WMPoint point)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wGetHeadForPointerLocation(WScreen *scr)
|
int
|
||||||
|
wGetHeadForPointerLocation(WScreen *scr)
|
||||||
{
|
{
|
||||||
WMPoint point;
|
WMPoint point;
|
||||||
Window bla;
|
Window bla;
|
||||||
@@ -271,7 +277,8 @@ wGetRectForHead(WScreen *scr, int head)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
WArea wGetUsableAreaForHead(WScreen *scr, int head, WArea *totalAreaPtr)
|
WArea
|
||||||
|
wGetUsableAreaForHead(WScreen *scr, int head, WArea *totalAreaPtr)
|
||||||
{
|
{
|
||||||
WArea totalArea, usableArea = scr->totalUsableArea;
|
WArea totalArea, usableArea = scr->totalUsableArea;
|
||||||
WMRect rect = wGetRectForHead(scr, head);
|
WMRect rect = wGetRectForHead(scr, head);
|
||||||
@@ -292,7 +299,8 @@ WArea wGetUsableAreaForHead(WScreen *scr, int head, WArea *totalAreaPtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WMPoint wGetPointToCenterRectInHead(WScreen *scr, int head, int width, int height)
|
WMPoint
|
||||||
|
wGetPointToCenterRectInHead(WScreen *scr, int head, int width, int height)
|
||||||
{
|
{
|
||||||
WMPoint p;
|
WMPoint p;
|
||||||
WMRect rect = wGetRectForHead(scr, head);
|
WMRect rect = wGetRectForHead(scr, head);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
/*
|
/*
|
||||||
* TODO: rewrite, too dirty
|
* TODO: rewrite, too dirty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -125,8 +124,10 @@ loadImage(RContext *rc, char *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void applyImage( RContext * rc, BackgroundTexture *texture, RImage *image, char type, int x, int y, int width, int height) {
|
static void
|
||||||
|
applyImage(RContext *rc, BackgroundTexture *texture, RImage *image, char type,
|
||||||
|
int x, int y, int width, int height)
|
||||||
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
Bool fimage = False;
|
Bool fimage = False;
|
||||||
|
|
||||||
@@ -198,7 +199,9 @@ void applyImage( RContext * rc, BackgroundTexture *texture, RImage *image, char
|
|||||||
XCopyArea(dpy, pixmap, texture->pixmap, DefaultGC(dpy, scr), 0, 0, width, height, x, y);
|
XCopyArea(dpy, pixmap, texture->pixmap, DefaultGC(dpy, scr), 0, 0, width, height, x, y);
|
||||||
|
|
||||||
XFreePixmap(dpy, pixmap);
|
XFreePixmap(dpy, pixmap);
|
||||||
if ( fimage) RReleaseImage( image);
|
if (fimage) {
|
||||||
|
RReleaseImage( image);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -589,6 +592,7 @@ parseTexture(RContext *rc, char *text)
|
|||||||
texture->width = scrWidth;
|
texture->width = scrWidth;
|
||||||
texture->height = scrHeight;
|
texture->height = scrHeight;
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
if (xine_count) {
|
if (xine_count) {
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<xine_count; ++i) {
|
for (i=0; i<xine_count; ++i) {
|
||||||
@@ -599,6 +603,9 @@ parseTexture(RContext *rc, char *text)
|
|||||||
} else {
|
} else {
|
||||||
applyImage(rc, texture, image, type[0], 0, 0, scrWidth, scrHeight);
|
applyImage(rc, texture, image, type[0], 0, 0, scrWidth, scrHeight);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
applyImage(rc, texture, image, type[0], 0, 0, scrWidth, scrHeight);
|
||||||
|
#endif
|
||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user