1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

Removed XRANDR externs

This patch moves the XRANDR variable definitions to screen.h, because
xrandr is related to screen behavior. Then, the definition externs
can be removed.

This patch also changes (in event.c) the ConfigureNotify event processing
to avoid call the "if" block if XRANDR is not enabled. I chose the option of
move the if into the HAVE_XRANDR block instead of include the
ConfigureNotify case inside of the HAVE_XRANDR block (proposed by
BALATON Zoltan) to avoid call the default option if not needed.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-01-08 09:08:24 +01:00
committed by Carlos R. Mafra
parent c058af6d35
commit b71f2c30fd
5 changed files with 7 additions and 24 deletions

View File

@@ -68,6 +68,7 @@
#include "wmspec.h"
#include "rootmenu.h"
#include "colormap.h"
#include "screen.h"
/******** Global Variables **********/
extern XContext wWinContext;
@@ -104,14 +105,6 @@ extern int wShapeEventBase;
extern int wXkbEventBase;
#endif
#ifdef HAVE_XRANDR
extern Bool has_randr;
extern int randr_event_base;
#endif
/* special flags */
/*extern char WDelayedActionSet;*/
/************ Local stuff ***********/
static void saveTimestamp(XEvent *event);
@@ -301,11 +294,10 @@ void DispatchEvent(XEvent * event)
break;
case ConfigureNotify:
if (event->xconfigure.window == DefaultRootWindow(dpy)) {
#ifdef HAVE_XRANDR
XRRUpdateConfiguration(event);
if (event->xconfigure.window == DefaultRootWindow(dpy))
XRRUpdateConfiguration(event);
#endif
}
break;
default: