Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
fad80bc4
Unverified
Commit
fad80bc4
authored
Aug 24, 2018
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/drop_double_min_max' into 3.6.x
Attributes GH PR #724:
https://github.com/ArcticaProject/nx-libs/pull/724
parents
b517b66e
3bd41aaf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
20 deletions
+14
-20
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+3
-2
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+1
-1
Keystroke.c
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+1
-1
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+9
-8
Utils.h
nx-X11/programs/Xserver/hw/nxagent/Utils.h
+0
-8
No files found.
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
fad80bc4
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "dixstruct.h"
#include "dixstruct.h"
#include "../../fb/fb.h"
#include "../../fb/fb.h"
#include "misc.h"
#include "Agent.h"
#include "Agent.h"
#include "Display.h"
#include "Display.h"
...
@@ -696,11 +697,11 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
...
@@ -696,11 +697,11 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
for
(
y
=
box
.
y1
;
y
<
box
.
y2
;
y
+=
h
)
for
(
y
=
box
.
y1
;
y
<
box
.
y2
;
y
+=
h
)
{
{
h
=
MIN
(
box
.
y2
-
y
,
tileHeight
);
h
=
min
(
box
.
y2
-
y
,
tileHeight
);
for
(
x
=
box
.
x1
;
x
<
box
.
x2
;
x
+=
w
)
for
(
x
=
box
.
x1
;
x
<
box
.
x2
;
x
+=
w
)
{
{
w
=
MIN
(
box
.
x2
-
x
,
tileWidth
);
w
=
min
(
box
.
x2
-
x
,
tileWidth
);
/*
/*
* FIXME: This should not occur.
* FIXME: This should not occur.
...
...
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
fad80bc4
...
@@ -1415,7 +1415,7 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size)
...
@@ -1415,7 +1415,7 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size)
if
(
len
)
if
(
len
)
{
{
snprintf
(
fontServerPath
,
MIN
(
size
,
len
+
1
),
"%s"
,
path
+
1
);
snprintf
(
fontServerPath
,
min
(
size
,
len
+
1
),
"%s"
,
path
+
1
);
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentGetFontServerPath: Got path [%s].
\n
"
,
fprintf
(
stderr
,
"nxagentGetFontServerPath: Got path [%s].
\n
"
,
...
...
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
View file @
fad80bc4
...
@@ -431,7 +431,7 @@ void nxagentDumpKeystrokes(void)
...
@@ -431,7 +431,7 @@ void nxagentDumpKeystrokes(void)
{
{
int
maxlen
=
0
;
int
maxlen
=
0
;
for
(
int
i
=
0
;
nxagentSpecialKeystrokeNames
[
i
];
i
++
)
for
(
int
i
=
0
;
nxagentSpecialKeystrokeNames
[
i
];
i
++
)
maxlen
=
MAX
(
maxlen
,
strlen
(
nxagentSpecialKeystrokeNames
[
i
]));
maxlen
=
min
(
maxlen
,
strlen
(
nxagentSpecialKeystrokeNames
[
i
]));
fprintf
(
stderr
,
"Current known keystrokes:
\n
"
);
fprintf
(
stderr
,
"Current known keystrokes:
\n
"
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
fad80bc4
...
@@ -55,6 +55,7 @@ is" without express or implied warranty.
...
@@ -55,6 +55,7 @@ is" without express or implied warranty.
#include "../../randr/randrstr.h"
#include "../../randr/randrstr.h"
#include "inputstr.h"
#include "inputstr.h"
#include "mivalidate.h"
#include "mivalidate.h"
#include "misc.h"
#include "Agent.h"
#include "Agent.h"
#include "Display.h"
#include "Display.h"
...
@@ -3641,10 +3642,10 @@ Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah,
...
@@ -3641,10 +3642,10 @@ Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah,
return
FALSE
;
return
FALSE
;
}
}
tx1
=
MAX
(
ax1
,
bx1
);
tx1
=
max
(
ax1
,
bx1
);
ty1
=
MAX
(
ay1
,
by1
);
ty1
=
max
(
ay1
,
by1
);
tx2
=
MIN
(
ax2
,
bx2
);
tx2
=
min
(
ax2
,
bx2
);
ty2
=
MIN
(
ay2
,
by2
);
ty2
=
min
(
ay2
,
by2
);
ix
=
tx1
-
ax1
;
ix
=
tx1
-
ax1
;
iy
=
ty1
-
ay1
;
iy
=
ty1
-
ay1
;
...
@@ -4022,10 +4023,10 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen)
...
@@ -4022,10 +4023,10 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen)
bbx1
=
bby1
=
INT_MAX
;
bbx1
=
bby1
=
INT_MAX
;
for
(
i
=
0
;
i
<
number
;
i
++
)
{
for
(
i
=
0
;
i
<
number
;
i
++
)
{
bbx2
=
MAX
(
bbx2
,
screeninfo
[
i
].
x_org
+
screeninfo
[
i
].
width
);
bbx2
=
max
(
bbx2
,
screeninfo
[
i
].
x_org
+
screeninfo
[
i
].
width
);
bby2
=
MAX
(
bby2
,
screeninfo
[
i
].
y_org
+
screeninfo
[
i
].
height
);
bby2
=
max
(
bby2
,
screeninfo
[
i
].
y_org
+
screeninfo
[
i
].
height
);
bbx1
=
MIN
(
bbx1
,
screeninfo
[
i
].
x_org
);
bbx1
=
min
(
bbx1
,
screeninfo
[
i
].
x_org
);
bby1
=
MIN
(
bby1
,
screeninfo
[
i
].
y_org
);
bby1
=
min
(
bby1
,
screeninfo
[
i
].
y_org
);
}
}
#ifdef DEBUG
#ifdef DEBUG
fprintf
(
stderr
,
"nxagentAdjustRandRXinerama: bounding box: left [%d] right [%d] top [%d] bottom [%d]
\n
"
,
bbx1
,
bbx2
,
bby1
,
bby2
);
fprintf
(
stderr
,
"nxagentAdjustRandRXinerama: bounding box: left [%d] right [%d] top [%d] bottom [%d]
\n
"
,
bbx1
,
bbx2
,
bby1
,
bby2
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Utils.h
View file @
fad80bc4
...
@@ -40,14 +40,6 @@
...
@@ -40,14 +40,6 @@
#define nxagentScale(i, ratio) (((i) * (ratio)) >> (PRECISION))
#define nxagentScale(i, ratio) (((i) * (ratio)) >> (PRECISION))
#ifndef MIN
#define MIN(A, B) ( (A) < (B) ? (A) : (B) )
#endif
#ifndef MAX
#define MAX(A, B) ( (A) > (B) ? (A) : (B) );
#endif
static
inline
const
char
*
validateString
(
const
char
*
str
)
{
static
inline
const
char
*
validateString
(
const
char
*
str
)
{
return
str
?
str
:
"(null)"
;
return
str
?
str
:
"(null)"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment