Magellan Linux

Contents of /trunk/tigervnc/patches/tigervnc-1.0.0-rh524340.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1115 - (show annotations) (download)
Sun Aug 22 18:37:54 2010 UTC (13 years, 8 months ago) by niro
File size: 2550 byte(s)
-added

1 Index: unix/vncviewer/DesktopWindow.h
2 ===================================================================
3 --- unix/vncviewer/DesktopWindow.h (revision 3903)
4 +++ unix/vncviewer/DesktopWindow.h (working copy)
5 @@ -29,6 +29,7 @@
6 #include "TXWindow.h"
7 #include "TXViewport.h"
8 #include "TXImage.h"
9 +#include "parameters.h"
10
11 class CConn;
12
13 @@ -54,6 +55,12 @@
14 // resetLocalCursor() stops the rendering of the local cursor
15 void resetLocalCursor();
16
17 + // setNoCursor() sets what to display when no cursor is defined - if dot or
18 + // nothing.
19 + inline void setNoCursor() {
20 + XDefineCursor(dpy, win(), dotWhenNoCursor ? dotCursor : noCursor);
21 + }
22 +
23 // Methods forwarded from CConn
24 void setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs);
25 void serverCutText(const char* str, rdr::U32 len);
26 Index: unix/vncviewer/CConn.cxx
27 ===================================================================
28 --- unix/vncviewer/CConn.cxx (revision 3903)
29 +++ unix/vncviewer/CConn.cxx (working copy)
30 @@ -684,6 +684,7 @@
31 desktop->resetLocalCursor();
32 }
33 dotWhenNoCursor.setParam(options.dotWhenNoCursor.checked());
34 + desktop->setNoCursor();
35 checkEncodings();
36 }
37
38 Index: unix/vncviewer/DesktopWindow.cxx
39 ===================================================================
40 --- unix/vncviewer/DesktopWindow.cxx (revision 3903)
41 +++ unix/vncviewer/DesktopWindow.cxx (working copy)
42 @@ -79,7 +79,7 @@
43 PointerMotionMask | KeyPressMask | KeyReleaseMask |
44 EnterWindowMask | LeaveWindowMask);
45 createXCursors();
46 - XDefineCursor(dpy, win(), dotCursor);
47 + setNoCursor();
48 im = new TXImage(dpy, width(), height());
49 if (!serverPF.trueColour)
50 im->setPF(serverPF);
51 @@ -139,12 +139,9 @@
52 if (((rdr::U8*)mask)[i]) break;
53
54 if (i == mask_len) {
55 - if (dotWhenNoCursor) {
56 + if (dotWhenNoCursor)
57 vlog.debug("cursor is empty - using dot");
58 - XDefineCursor(dpy, win(), dotCursor);
59 - } else {
60 - XDefineCursor(dpy, win(), noCursor);
61 - }
62 + setNoCursor();
63 cursorAvailable = false;
64 return;
65 }
66 @@ -206,7 +203,7 @@
67 void DesktopWindow::resetLocalCursor()
68 {
69 hideLocalCursor();
70 - XDefineCursor(dpy, win(), dotCursor);
71 + setNoCursor();
72 cursorAvailable = false;
73 }
74
75 @@ -226,7 +223,7 @@
76 if (!getPF().equal(cursor.getPF()) ||
77 cursor.getRect().is_empty()) {
78 vlog.error("attempting to render invalid local cursor");
79 - XDefineCursor(dpy, win(), dotCursor);
80 + setNoCursor();
81 cursorAvailable = false;
82 return;
83 }