Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
PocketInsanity
libSDL
Commits
8d6d1c0e
Commit
8d6d1c0e
authored
Jul 13, 2010
by
Ryan C. Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check configure-defined macro before doing _anything_ with XShape.
parent
799e5c6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
SDL_x11shape.c
src/video/x11/SDL_x11shape.c
+8
-3
SDL_x11sym.h
src/video/x11/SDL_x11sym.h
+1
-1
SDL_x11video.h
src/video/x11/SDL_x11video.h
+3
-0
No files found.
src/video/x11/SDL_x11shape.c
View file @
8d6d1c0e
...
...
@@ -21,13 +21,14 @@
*/
#include <assert.h>
#include
<X11/extensions/shape.h>
#include
"SDL_x11video.h"
#include "SDL_x11shape.h"
#include "SDL_x11window.h"
#include "SDL_x11video.h"
SDL_WindowShaper
*
X11_CreateShaper
(
SDL_Window
*
window
)
{
SDL_WindowShaper
*
result
=
NULL
;
#if SDL_VIDEO_DRIVER_X11_XSHAPE
if
(
SDL_X11_HAVE_XSHAPE
)
{
/* Make sure X server supports it. */
result
=
malloc
(
sizeof
(
SDL_WindowShaper
));
result
->
window
=
window
;
...
...
@@ -38,6 +39,7 @@ SDL_WindowShaper* X11_CreateShaper(SDL_Window* window) {
int
resized_properly
=
X11_ResizeWindowShape
(
window
);
assert
(
resized_properly
==
0
);
}
#endif
return
result
;
}
...
...
@@ -69,6 +71,8 @@ int X11_ResizeWindowShape(SDL_Window* window) {
int
X11_SetWindowShape
(
SDL_WindowShaper
*
shaper
,
SDL_Surface
*
shape
,
SDL_WindowShapeMode
*
shapeMode
)
{
if
(
shaper
==
NULL
||
shape
==
NULL
||
shaper
->
driverdata
==
NULL
)
return
-
1
;
#if SDL_VIDEO_DRIVER_X11_XSHAPE
if
(
!
SDL_ISPIXELFORMAT_ALPHA
(
SDL_MasksToPixelFormatEnum
(
shape
->
format
->
BitsPerPixel
,
shape
->
format
->
Rmask
,
shape
->
format
->
Gmask
,
shape
->
format
->
Bmask
,
shape
->
format
->
Amask
)))
return
-
2
;
if
(
shape
->
w
!=
shaper
->
window
->
w
||
shape
->
h
!=
shaper
->
window
->
h
)
...
...
@@ -85,6 +89,7 @@ int X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowSha
XSync
(
windowdata
->
videodata
->
display
,
False
);
XFreePixmap
(
windowdata
->
videodata
->
display
,
shapemask
);
#endif
return
0
;
}
src/video/x11/SDL_x11sym.h
View file @
8d6d1c0e
...
...
@@ -233,7 +233,7 @@ SDL_X11_SYM(Status,XScreenSaverQueryVersion,(Display *dpy,int *major_versionp,in
SDL_X11_SYM
(
void
,
XScreenSaverSuspend
,(
Display
*
dpy
,
Bool
suspend
),(
dpy
,
suspend
),
return
)
#endif
#if
1
/* !!! FIXME: SDL_VIDEO_DRIVER_X11_XSHAPE */
#if
SDL_VIDEO_DRIVER_X11_XSHAPE
SDL_X11_MODULE
(
XSHAPE
)
SDL_X11_SYM
(
void
,
XShapeCombineMask
,(
Display
*
dpy
,
Window
dest
,
int
dest_kind
,
int
x_off
,
int
y_off
,
Pixmap
src
,
int
op
),(
dpy
,
dest
,
dest_kind
,
x_off
,
y_off
,
src
,
op
),)
#endif
...
...
src/video/x11/SDL_x11video.h
View file @
8d6d1c0e
...
...
@@ -45,6 +45,9 @@
#if SDL_VIDEO_DRIVER_X11_SCRNSAVER
#include <X11/extensions/scrnsaver.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XSHAPE
#include <X11/extensions/shape.h>
#endif
#include "SDL_x11dyn.h"
...
...
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