1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-25 16:02:33 +01:00

Code refactoring: replaced macro 'XINERAMA' by 'USE_XINERAMA' for consistency

The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-11-17 18:51:15 +01:00
committed by Carlos R. Mafra
parent 1292b5a0cc
commit e106d88a42
5 changed files with 19 additions and 19 deletions

View File

@@ -1304,7 +1304,7 @@ void wShowInfoPanel(WScreen *scr)
strbuf = wstrappend(strbuf, ", MWM");
#endif
#ifdef XINERAMA
#ifdef USE_XINERAMA
strbuf = wstrappend(strbuf, _("\n"));
#ifdef SOLARIS_XINERAMA
strbuf = wstrappend(strbuf, _("Solaris "));

View File

@@ -258,7 +258,7 @@ static void showWorkspaceName(WScreen * scr, int workspace)
char *name = w_global.workspace.array[workspace]->name;
int len = strlen(name);
int x, y;
#ifdef XINERAMA
#ifdef USE_XINERAMA
int head;
WMRect rect;
int xx, yy;
@@ -286,7 +286,7 @@ static void showWorkspaceName(WScreen * scr, int workspace)
w = WMWidthOfString(w_global.workspace.font_for_name, name, len);
h = WMFontHeight(w_global.workspace.font_for_name);
#ifdef XINERAMA
#ifdef USE_XINERAMA
head = wGetHeadForPointerLocation(scr);
rect = wGetRectForHead(scr, head);
if (scr->xine_info.count) {
@@ -301,7 +301,7 @@ static void showWorkspaceName(WScreen * scr, int workspace)
switch (wPreferences.workspace_name_display_position) {
case WD_TOP:
#ifdef XINERAMA
#ifdef USE_XINERAMA
px = xx;
#else
px = (scr->scr_width - (w + 4)) / 2;
@@ -309,7 +309,7 @@ static void showWorkspaceName(WScreen * scr, int workspace)
py = WORKSPACE_NAME_DISPLAY_PADDING;
break;
case WD_BOTTOM:
#ifdef XINERAMA
#ifdef USE_XINERAMA
px = xx;
#else
px = (scr->scr_width - (w + 4)) / 2;
@@ -334,7 +334,7 @@ static void showWorkspaceName(WScreen * scr, int workspace)
break;
case WD_CENTER:
default:
#ifdef XINERAMA
#ifdef USE_XINERAMA
px = xx;
py = yy;
#else

View File

@@ -27,7 +27,7 @@
#include "framewin.h"
#include "placement.h"
#ifdef XINERAMA
#ifdef USE_XINERAMA
# ifdef SOLARIS_XINERAMA /* sucks */
# include <X11/extensions/xinerama.h>
# else
@@ -40,7 +40,7 @@ void wInitXinerama(WScreen * scr)
scr->xine_info.primary_head = 0;
scr->xine_info.screens = NULL;
scr->xine_info.count = 0;
#ifdef XINERAMA
#ifdef USE_XINERAMA
# ifdef SOLARIS_XINERAMA
if (XineramaGetState(dpy, scr->screen)) {
WXineramaInfo *info = &scr->xine_info;
@@ -79,7 +79,7 @@ void wInitXinerama(WScreen * scr)
XFree(xine_screens);
}
# endif /* !SOLARIS_XINERAMA */
#endif /* XINERAMA */
#endif /* USE_XINERAMA */
}
int wGetRectPlacementInfo(WScreen * scr, WMRect rect, int *flags)