mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +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:
committed by
Carlos R. Mafra
parent
c058af6d35
commit
b71f2c30fd
14
src/event.c
14
src/event.c
@@ -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:
|
||||
|
||||
@@ -139,11 +139,6 @@ Bool wXkbSupported;
|
||||
int wXkbEventBase;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
Bool has_randr;
|
||||
int randr_event_base;
|
||||
#endif
|
||||
|
||||
/* special flags */
|
||||
char WProgramSigState = 0;
|
||||
char WProgramState = WSTATE_NORMAL;
|
||||
|
||||
@@ -80,9 +80,6 @@ extern int wScreenCount;
|
||||
#ifdef KEEP_XKB_LOCK_STATUS
|
||||
extern int wXkbSupported;
|
||||
#endif
|
||||
#ifdef HAVE_XRANDR
|
||||
extern int has_randr;
|
||||
#endif
|
||||
|
||||
extern WDDomain *WDWindowMaker;
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#define WTB_PFOCUSED 4
|
||||
#define WTB_MENU 6
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
Bool has_randr;
|
||||
int randr_event_base;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
WMRect *screens;
|
||||
|
||||
@@ -99,11 +99,6 @@ extern Bool wXkbSupported;
|
||||
extern int wXkbEventBase;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
extern Bool has_randr;
|
||||
extern int randr_event_base;
|
||||
#endif
|
||||
|
||||
/* contexts */
|
||||
extern XContext wWinContext;
|
||||
extern XContext wAppWinContext;
|
||||
|
||||
Reference in New Issue
Block a user