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
4bbe8f90
Commit
4bbe8f90
authored
Sep 26, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Ignore X11 errors happening on the clipboard display connection.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a52d0919
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
clipboard.c
dlls/winex11.drv/clipboard.c
+5
-12
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+3
-0
No files found.
dlls/winex11.drv/clipboard.c
View file @
4bbe8f90
...
...
@@ -203,6 +203,8 @@ static ULONG64 last_clipboard_update;
static
struct
clipboard_format
**
current_x11_formats
;
static
unsigned
int
nb_current_x11_formats
;
Display
*
clipboard_display
=
NULL
;
static
const
char
*
debugstr_format
(
UINT
id
)
{
WCHAR
buffer
[
256
];
...
...
@@ -259,11 +261,6 @@ static int is_atom_error( Display *display, XErrorEvent *event, void *arg )
return
(
event
->
error_code
==
BadAtom
);
}
static
int
is_window_error
(
Display
*
display
,
XErrorEvent
*
event
,
void
*
arg
)
{
return
(
event
->
error_code
==
BadWindow
);
}
/**************************************************************************
* find_win32_format
...
...
@@ -2007,12 +2004,12 @@ static DWORD WINAPI clipboard_thread( void *arg )
XSetWindowAttributes
attr
;
WNDCLASSW
class
;
MSG
msg
;
Display
*
display
=
thread_init_display
();
if
(
!
wait_clipboard_mutex
())
return
0
;
clipboard_display
=
thread_init_display
();
attr
.
event_mask
=
PropertyChangeMask
;
import_window
=
XCreateWindow
(
display
,
root_window
,
0
,
0
,
1
,
1
,
0
,
CopyFromParent
,
import_window
=
XCreateWindow
(
clipboard_
display
,
root_window
,
0
,
0
,
1
,
1
,
0
,
CopyFromParent
,
InputOutput
,
CopyFromParent
,
CWEventMask
,
&
attr
);
if
(
!
import_window
)
{
...
...
@@ -2039,7 +2036,7 @@ static DWORD WINAPI clipboard_thread( void *arg )
clipboard_thread_id
=
GetCurrentThreadId
();
AddClipboardFormatListener
(
clipboard_hwnd
);
register_builtin_formats
();
grab_win32_clipboard
(
display
);
grab_win32_clipboard
(
clipboard_
display
);
TRACE
(
"clipboard thread %04x running
\n
"
,
GetCurrentThreadId
()
);
while
(
GetMessageW
(
&
msg
,
0
,
0
,
0
))
DispatchMessageW
(
&
msg
);
...
...
@@ -2075,8 +2072,6 @@ BOOL X11DRV_SelectionRequest( HWND hwnd, XEvent *xev )
XEvent
result
;
Atom
rprop
=
None
;
X11DRV_expect_error
(
display
,
is_window_error
,
NULL
);
TRACE
(
"got request on %lx for selection %s target %s win %lx prop %s
\n
"
,
event
->
owner
,
debugstr_xatom
(
event
->
selection
),
debugstr_xatom
(
event
->
target
),
event
->
requestor
,
debugstr_xatom
(
event
->
property
));
...
...
@@ -2105,8 +2100,6 @@ done:
result
.
xselection
.
time
=
event
->
time
;
TRACE
(
"sending SelectionNotify for %s to %lx
\n
"
,
debugstr_xatom
(
rprop
),
event
->
requestor
);
XSendEvent
(
display
,
event
->
requestor
,
False
,
NoEventMask
,
&
result
);
XSync
(
display
,
False
);
if
(
X11DRV_check_error
())
WARN
(
"requestor %lx is no longer valid
\n
"
,
event
->
requestor
);
return
FALSE
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
4bbe8f90
...
...
@@ -385,6 +385,7 @@ extern int copy_default_colors DECLSPEC_HIDDEN;
extern
int
alloc_system_colors
DECLSPEC_HIDDEN
;
extern
int
xrender_error_base
DECLSPEC_HIDDEN
;
extern
HMODULE
x11drv_module
DECLSPEC_HIDDEN
;
extern
Display
*
clipboard_display
DECLSPEC_HIDDEN
;
/* atoms */
...
...
dlls/winex11.drv/x11drv_main.c
View file @
4bbe8f90
...
...
@@ -210,6 +210,9 @@ static inline BOOL ignore_error( Display *display, XErrorEvent *event )
if
((
event
->
request_code
==
X_SetInputFocus
||
event
->
request_code
==
X_ChangeWindowAttributes
)
&&
(
event
->
error_code
==
BadMatch
||
event
->
error_code
==
BadWindow
))
return
TRUE
;
/* the clipboard display interacts with external windows, ignore all errors */
if
(
display
==
clipboard_display
)
return
TRUE
;
/* ignore a number of errors on gdi display caused by creating/destroying windows */
if
(
display
==
gdi_display
)
{
...
...
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