hw/xwin: Add fUseUnicode as parameter to winClipboardProc()
Add fUseUnicode as parameter to winClipboardProc() Access g_fUseUnicode global when calling it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
126c1cfaa5
commit
be61a1fc7e
|
@ -54,12 +54,6 @@
|
||||||
#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
|
#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
|
||||||
#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
|
#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern Bool g_fUnicodeClipboard;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global variables
|
* Global variables
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +63,6 @@ static jmp_buf g_jmpEntry;
|
||||||
static XIOErrorHandler g_winClipboardOldIOErrorHandler;
|
static XIOErrorHandler g_winClipboardOldIOErrorHandler;
|
||||||
static pthread_t g_winClipboardProcThread;
|
static pthread_t g_winClipboardProcThread;
|
||||||
|
|
||||||
Bool g_fUseUnicode = FALSE;
|
|
||||||
int xfixes_event_base;
|
int xfixes_event_base;
|
||||||
int xfixes_error_base;
|
int xfixes_error_base;
|
||||||
|
|
||||||
|
@ -93,7 +86,7 @@ static int
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
winClipboardProc(char *szDisplay)
|
winClipboardProc(Bool fUseUnicode, char *szDisplay)
|
||||||
{
|
{
|
||||||
Atom atomClipboard;
|
Atom atomClipboard;
|
||||||
int iReturn;
|
int iReturn;
|
||||||
|
@ -110,18 +103,11 @@ winClipboardProc(char *szDisplay)
|
||||||
Display *pDisplay = NULL;
|
Display *pDisplay = NULL;
|
||||||
Window iWindow = None;
|
Window iWindow = None;
|
||||||
int iRetries;
|
int iRetries;
|
||||||
Bool fUseUnicode;
|
|
||||||
int iSelectError;
|
int iSelectError;
|
||||||
Bool fShutdown = FALSE;
|
Bool fShutdown = FALSE;
|
||||||
|
|
||||||
winDebug("winClipboardProc - Hello\n");
|
winDebug("winClipboardProc - Hello\n");
|
||||||
|
|
||||||
/* Do we use Unicode clipboard? */
|
|
||||||
fUseUnicode = g_fUnicodeClipboard;
|
|
||||||
|
|
||||||
/* Save the Unicode support flag in a global */
|
|
||||||
g_fUseUnicode = fUseUnicode;
|
|
||||||
|
|
||||||
/* Allow multiple threads to access Xlib */
|
/* Allow multiple threads to access Xlib */
|
||||||
if (XInitThreads() == 0) {
|
if (XInitThreads() == 0) {
|
||||||
ErrorF("winClipboardProc - XInitThreads failed.\n");
|
ErrorF("winClipboardProc - XInitThreads failed.\n");
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#ifndef WINCLIPBOARD_H
|
#ifndef WINCLIPBOARD_H
|
||||||
#define WINCLIPBOARD_H
|
#define WINCLIPBOARD_H
|
||||||
|
|
||||||
Bool winClipboardProc(char *szDisplay);
|
Bool winClipboardProc(Bool fUseUnicode, char *szDisplay);
|
||||||
|
|
||||||
void winFixClipboardChain(void);
|
void winFixClipboardChain(void);
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ winClipboardThreadProc(void *arg)
|
||||||
/* Flag that clipboard client has been launched */
|
/* Flag that clipboard client has been launched */
|
||||||
g_fClipboardStarted = TRUE;
|
g_fClipboardStarted = TRUE;
|
||||||
|
|
||||||
fShutdown = winClipboardProc(szDisplay);
|
fShutdown = winClipboardProc(g_fUnicodeClipboard, szDisplay);
|
||||||
|
|
||||||
/* Flag that clipboard client has stopped */
|
/* Flag that clipboard client has stopped */
|
||||||
g_fClipboardStarted = FALSE;
|
g_fClipboardStarted = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue