Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3bfa90ee
Commit
3bfa90ee
authored
Apr 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Fix handling of property sizes for 64-bit platforms.
parent
6d80f099
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
8 deletions
+15
-8
clipboard.c
dlls/winex11.drv/clipboard.c
+3
-3
event.c
dlls/winex11.drv/event.c
+1
-1
graphics.c
dlls/winex11.drv/graphics.c
+1
-1
window.c
dlls/winex11.drv/window.c
+1
-1
winpos.c
dlls/winex11.drv/winpos.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+7
-0
xdnd.c
dlls/winex11.drv/xdnd.c
+1
-1
No files found.
dlls/winex11.drv/clipboard.c
View file @
3bfa90ee
...
...
@@ -1902,8 +1902,8 @@ static int X11DRV_CLIPBOARD_QueryAvailableData(LPCLIPBOARDINFO lpcbinfo)
* The TARGETS property should have returned us a list of atoms
* corresponding to each selection target format supported.
*/
if
(
a
type
==
XA_ATOM
||
atype
==
x11drv_atom
(
TARGETS
))
X11DRV_CLIPBOARD_InsertSelectionProperties
(
display
,
targetList
,
(
cSelectionTargets
*
aformat
/
(
8
*
sizeof
(
Atom
)))
);
if
(
a
format
==
32
&&
(
atype
==
XA_ATOM
||
atype
==
x11drv_atom
(
TARGETS
)
))
X11DRV_CLIPBOARD_InsertSelectionProperties
(
display
,
targetList
,
cSelectionTargets
);
/* Free the list of targets */
wine_tsx11_lock
();
...
...
@@ -2027,7 +2027,7 @@ static BOOL X11DRV_CLIPBOARD_ReadProperty(Window w, Atom prop,
return
FALSE
;
}
count
=
nitems
*
(
aformat
/
8
);
count
=
get_property_size
(
aformat
,
nitems
);
if
(
!
val
)
*
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pos
*
sizeof
(
int
)
+
count
+
1
);
else
*
data
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
val
,
pos
*
sizeof
(
int
)
+
count
+
1
);
...
...
dlls/winex11.drv/event.c
View file @
3bfa90ee
...
...
@@ -677,7 +677,7 @@ int get_window_wm_state( Display *display, struct x11drv_win_data *data )
sizeof
(
*
state
)
/
sizeof
(
CARD32
),
False
,
x11drv_atom
(
WM_STATE
),
&
type
,
&
format
,
&
count
,
&
remaining
,
(
unsigned
char
**
)
&
state
))
{
if
(
type
==
x11drv_atom
(
WM_STATE
)
&&
format
&&
count
>=
sizeof
(
*
state
)
/
(
format
/
8
))
if
(
type
==
x11drv_atom
(
WM_STATE
)
&&
get_property_size
(
format
,
count
)
>=
sizeof
(
*
state
))
ret
=
state
->
state
;
XFree
(
state
);
}
...
...
dlls/winex11.drv/graphics.c
View file @
3bfa90ee
...
...
@@ -1394,7 +1394,7 @@ static unsigned char *get_icm_profile( unsigned long *size )
&
type
,
&
format
,
&
count
,
&
remaining
,
&
profile
);
if
(
format
&&
count
)
{
*
size
=
count
*
(
format
/
8
);
*
size
=
get_property_size
(
format
,
count
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
size
)))
memcpy
(
ret
,
profile
,
*
size
);
XFree
(
profile
);
}
...
...
dlls/winex11.drv/window.c
View file @
3bfa90ee
...
...
@@ -866,7 +866,7 @@ static char *get_process_name(void)
*/
static
void
set_initial_wm_hints
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
{
int
i
;
long
i
;
Atom
protocols
[
3
];
Atom
dndVersion
=
4
;
XClassHint
*
class_hints
;
...
...
dlls/winex11.drv/winpos.c
View file @
3bfa90ee
...
...
@@ -618,7 +618,7 @@ static BOOL is_netwm_supported( Display *display, Atom atom )
if
(
!
XGetWindowProperty
(
display
,
DefaultRootWindow
(
display
),
x11drv_atom
(
_NET_SUPPORTED
),
0
,
~
0UL
,
False
,
XA_ATOM
,
&
type
,
&
format
,
&
count
,
&
remaining
,
(
unsigned
char
**
)
&
net_supported
))
net_supported_count
=
count
*
(
format
/
8
)
/
sizeof
(
Atom
);
net_supported_count
=
get_property_size
(
format
,
count
)
/
sizeof
(
Atom
);
else
net_supported_count
=
0
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
3bfa90ee
...
...
@@ -520,6 +520,13 @@ static inline struct x11drv_thread_data *x11drv_thread_data(void)
static
inline
Display
*
thread_display
(
void
)
{
return
x11drv_thread_data
()
->
display
;
}
static
inline
size_t
get_property_size
(
int
format
,
unsigned
long
count
)
{
/* format==32 means long, which can be 64 bits... */
if
(
format
==
32
)
return
count
*
sizeof
(
long
);
return
count
*
(
format
/
8
);
}
extern
Visual
*
visual
;
extern
Window
root_window
;
extern
unsigned
int
screen_width
;
...
...
dlls/winex11.drv/xdnd.c
View file @
3bfa90ee
...
...
@@ -286,7 +286,7 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm,
AnyPropertyType
,
&
acttype
,
&
actfmt
,
&
icount
,
&
bytesret
,
&
data
);
wine_tsx11_unlock
();
entries
+=
X11DRV_XDND_MapFormat
(
types
[
i
],
data
,
icount
*
(
actfmt
/
8
));
entries
+=
X11DRV_XDND_MapFormat
(
types
[
i
],
data
,
get_property_size
(
actfmt
,
icount
));
wine_tsx11_lock
();
XFree
(
data
);
wine_tsx11_unlock
();
...
...
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