diff options
-rw-r--r-- | xwinclip.c | 27 |
1 files changed, 2 insertions, 25 deletions
@@ -66,9 +66,6 @@ #define WINDOW_TITLE "xwinclip" #define WIN_MSG_QUEUE_FNAME "/dev/windows" -#define WIN_CONNECT_RETRIES 3 -#define WIN_CONNECT_DELAY 4 - /* * Local variables */ @@ -148,13 +145,9 @@ ClipboardProc(Bool fUnicodeSupport, char *pszDisplay) int iMaxDescriptor; Display *pDisplay = NULL; Window iWindow = None; - int iRetries; int iSelectError; Bool fShutdown = FALSE; - /* Initialize retry count */ - iRetries = 0; - /* Set error handler */ XSetErrorHandler(ClipboardErrorHandler); g_ClipboardProcThread = pthread_self(); @@ -168,26 +161,10 @@ ClipboardProc(Bool fUnicodeSupport, char *pszDisplay) } /* Open the X display */ - do - { - pDisplay = XOpenDisplay (pszDisplay); - if (pDisplay == NULL) - { - winError ("Could not open display, try: %d, sleeping: %d\n", - iRetries + 1, WIN_CONNECT_DELAY); - ++iRetries; - sleep (WIN_CONNECT_DELAY); - continue; - } - else - break; - } - while (pDisplay == NULL && iRetries < WIN_CONNECT_RETRIES); - - /* Make sure that the display opened */ + pDisplay = XOpenDisplay (pszDisplay); if (pDisplay == NULL) { - winError ("Failed opening the display, giving up\n"); + winError ("Could not open display\n"); goto ClipboardProc_Done; } |