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
12
src/event.c
12
src/event.c
@@ -68,6 +68,7 @@
|
|||||||
#include "wmspec.h"
|
#include "wmspec.h"
|
||||||
#include "rootmenu.h"
|
#include "rootmenu.h"
|
||||||
#include "colormap.h"
|
#include "colormap.h"
|
||||||
|
#include "screen.h"
|
||||||
|
|
||||||
/******** Global Variables **********/
|
/******** Global Variables **********/
|
||||||
extern XContext wWinContext;
|
extern XContext wWinContext;
|
||||||
@@ -104,14 +105,6 @@ extern int wShapeEventBase;
|
|||||||
extern int wXkbEventBase;
|
extern int wXkbEventBase;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
|
||||||
extern Bool has_randr;
|
|
||||||
extern int randr_event_base;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* special flags */
|
|
||||||
/*extern char WDelayedActionSet;*/
|
|
||||||
|
|
||||||
/************ Local stuff ***********/
|
/************ Local stuff ***********/
|
||||||
|
|
||||||
static void saveTimestamp(XEvent *event);
|
static void saveTimestamp(XEvent *event);
|
||||||
@@ -301,11 +294,10 @@ void DispatchEvent(XEvent * event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
if (event->xconfigure.window == DefaultRootWindow(dpy)) {
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef HAVE_XRANDR
|
||||||
|
if (event->xconfigure.window == DefaultRootWindow(dpy))
|
||||||
XRRUpdateConfiguration(event);
|
XRRUpdateConfiguration(event);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -139,11 +139,6 @@ Bool wXkbSupported;
|
|||||||
int wXkbEventBase;
|
int wXkbEventBase;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
|
||||||
Bool has_randr;
|
|
||||||
int randr_event_base;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* special flags */
|
/* special flags */
|
||||||
char WProgramSigState = 0;
|
char WProgramSigState = 0;
|
||||||
char WProgramState = WSTATE_NORMAL;
|
char WProgramState = WSTATE_NORMAL;
|
||||||
|
|||||||
@@ -80,9 +80,6 @@ extern int wScreenCount;
|
|||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
#ifdef KEEP_XKB_LOCK_STATUS
|
||||||
extern int wXkbSupported;
|
extern int wXkbSupported;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_XRANDR
|
|
||||||
extern int has_randr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern WDDomain *WDWindowMaker;
|
extern WDDomain *WDWindowMaker;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,10 @@
|
|||||||
#define WTB_PFOCUSED 4
|
#define WTB_PFOCUSED 4
|
||||||
#define WTB_MENU 6
|
#define WTB_MENU 6
|
||||||
|
|
||||||
|
#ifdef HAVE_XRANDR
|
||||||
|
Bool has_randr;
|
||||||
|
int randr_event_base;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
WMRect *screens;
|
WMRect *screens;
|
||||||
|
|||||||
@@ -99,11 +99,6 @@ extern Bool wXkbSupported;
|
|||||||
extern int wXkbEventBase;
|
extern int wXkbEventBase;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
|
||||||
extern Bool has_randr;
|
|
||||||
extern int randr_event_base;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* contexts */
|
/* contexts */
|
||||||
extern XContext wWinContext;
|
extern XContext wWinContext;
|
||||||
extern XContext wAppWinContext;
|
extern XContext wAppWinContext;
|
||||||
|
|||||||
Reference in New Issue
Block a user