Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xfwm4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xfce
xfwm4
Commits
33d36753
Commit
33d36753
authored
18 years ago
by
Olivier Fourdan
Browse files
Options
Downloads
Patches
Plain Diff
Add support for shape input with XShape extension 1.1 (Bug #3092)
(Old svn revision: 25369)
parent
45030bdc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/display.c
+12
-7
12 additions, 7 deletions
src/display.c
src/display.h
+1
-0
1 addition, 0 deletions
src/display.h
src/frame.c
+11
-0
11 additions, 0 deletions
src/frame.c
with
24 additions
and
7 deletions
src/display.c
+
12
−
7
View file @
33d36753
...
...
@@ -182,9 +182,7 @@ DisplayInfo *
myDisplayInit
(
GdkDisplay
*
gdisplay
)
{
DisplayInfo
*
display
;
#ifdef HAVE_XSYNC
int
xsync_major
,
xsync_minor
;
#endif
/* HAVE_XSYNC */
int
major
,
minor
;
int
dummy
;
display
=
g_new0
(
DisplayInfo
,
1
);
...
...
@@ -205,11 +203,18 @@ myDisplayInit (GdkDisplay *gdisplay)
}
/* Test XShape extension support */
major
=
0
;
minor
=
0
;
display
->
shape_version
=
0
;
if
(
XShapeQueryExtension
(
display
->
dpy
,
&
display
->
shape_event_base
,
&
dummy
))
{
display
->
have_shape
=
TRUE
;
if
(
XShapeQueryVersion
(
display
->
dpy
,
&
major
,
&
minor
))
{
display
->
shape_version
=
major
*
1000
+
minor
;
}
}
else
{
...
...
@@ -224,15 +229,15 @@ myDisplayInit (GdkDisplay *gdisplay)
display
->
xsync_error_base
=
0
;
display
->
xsync_event_base
=
0
;
xsync_
major
=
SYNC_MAJOR_VERSION
;
xsync_
minor
=
SYNC_MINOR_VERSION
;
major
=
SYNC_MAJOR_VERSION
;
minor
=
SYNC_MINOR_VERSION
;
if
(
XSyncQueryExtension
(
display
->
dpy
,
&
display
->
xsync_event_base
,
&
display
->
xsync_error_base
)
&&
XSyncInitialize
(
display
->
dpy
,
&
xsync_
major
,
&
xsync_
minor
))
&
major
,
&
minor
))
{
display
->
have_xsync
=
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
src/display.h
+
1
−
0
View file @
33d36753
...
...
@@ -241,6 +241,7 @@ struct _DisplayInfo
gboolean
have_render
;
gboolean
have_xrandr
;
gboolean
have_xsync
;
gint
shape_version
;
gint
shape_event_base
;
gint
dbl_click_time
;
gint
xgrabcount
;
...
...
This diff is collapsed.
Click to expand it.
src/frame.c
+
11
−
0
View file @
33d36753
...
...
@@ -37,6 +37,10 @@
#include
"frame.h"
#include
"compositor.h"
#ifndef ShapeInput
#define ShapeInput 2;
#endif
int
frameDecorationLeft
(
ScreenInfo
*
screen_info
)
{
...
...
@@ -807,6 +811,13 @@ frameSetShape (Client * c, int state, FramePixmap * frame_pix, int button_x[BUTT
XShapeCombineRectangles
(
display_info
->
dpy
,
shape_win
,
ShapeBounding
,
0
,
0
,
&
rect
,
1
,
ShapeIntersect
,
Unsorted
);
XShapeCombineShape
(
display_info
->
dpy
,
c
->
frame
,
ShapeBounding
,
0
,
0
,
shape_win
,
ShapeBounding
,
ShapeSet
);
/* Set Input shape when using XShape extension 1.1 and later */
if
(
display_info
->
shape_version
>=
1001
)
{
XShapeCombineShape
(
display_info
->
dpy
,
shape_win
,
ShapeInput
,
frameLeft
(
c
),
frameTop
(
c
),
c
->
window
,
ShapeBounding
,
ShapeSubtract
);
XShapeCombineShape
(
display_info
->
dpy
,
shape_win
,
ShapeInput
,
frameLeft
(
c
),
frameTop
(
c
),
c
->
window
,
ShapeInput
,
ShapeUnion
);
XShapeCombineShape
(
display_info
->
dpy
,
c
->
frame
,
ShapeInput
,
0
,
0
,
shape_win
,
ShapeInput
,
ShapeSet
);
}
XDestroyWindow
(
display_info
->
dpy
,
shape_win
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment