krystof1119 1 month ago
parent
commit
e8f6f54aee
No account linked to committer's email address

+ 13
- 2
java/com/tigervnc/vncviewer/OptionsDialog.java View File

/* Misc. */ /* Misc. */
JCheckBox sharedCheckbox; JCheckBox sharedCheckbox;
JCheckBox dotWhenNoCursorCheckbox; JCheckBox dotWhenNoCursorCheckbox;
JCheckBox largeCursorInsteadOfDotCheckbox;
JCheckBox acceptBellCheckbox; JCheckBox acceptBellCheckbox;


/* SSH */ /* SSH */
/* Misc. */ /* Misc. */
sharedCheckbox.setSelected(shared.getValue()); sharedCheckbox.setSelected(shared.getValue());
dotWhenNoCursorCheckbox.setSelected(dotWhenNoCursor.getValue()); dotWhenNoCursorCheckbox.setSelected(dotWhenNoCursor.getValue());
largeCursorInsteadOfDotCheckbox.setSelected(largeCursorInsteadOfDot.getValue());
acceptBellCheckbox.setSelected(acceptBell.getValue()); acceptBellCheckbox.setSelected(acceptBell.getValue());


/* SSH */ /* SSH */
/* Misc. */ /* Misc. */
shared.setParam(sharedCheckbox.isSelected()); shared.setParam(sharedCheckbox.isSelected());
dotWhenNoCursor.setParam(dotWhenNoCursorCheckbox.isSelected()); dotWhenNoCursor.setParam(dotWhenNoCursorCheckbox.isSelected());
largeCursorInsteadOfDot.setParam(largeCursorInsteadOfDotCheckbox.isSelected());
acceptBell.setParam(acceptBellCheckbox.isSelected()); acceptBell.setParam(acceptBellCheckbox.isSelected());


/* SSH */ /* SSH */
sharedCheckbox = sharedCheckbox =
new JCheckBox("Shared (don't disconnect other viewers)"); new JCheckBox("Shared (don't disconnect other viewers)");
dotWhenNoCursorCheckbox = new JCheckBox("Show dot when no cursor"); dotWhenNoCursorCheckbox = new JCheckBox("Show dot when no cursor");
largeCursorInsteadOfDotCheckbox = new JCheckBox("Use large cursor instead of dot");
acceptBellCheckbox = new JCheckBox("Beep when requested by the server"); acceptBellCheckbox = new JCheckBox("Beep when requested by the server");
MiscPanel.add(sharedCheckbox, MiscPanel.add(sharedCheckbox,
new GridBagConstraints(0, 0, new GridBagConstraints(0, 0,
LINE_START, NONE, LINE_START, NONE,
new Insets(0, 0, 4, 0), new Insets(0, 0, 4, 0),
NONE, NONE)); NONE, NONE));
MiscPanel.add(acceptBellCheckbox,
MiscPanel.add(largeCursorInsteadOfDotCheckbox,
new GridBagConstraints(0, 2, new GridBagConstraints(0, 2,
1, 1, 1, 1,
LIGHT, LIGHT, LIGHT, LIGHT,
LINE_START, NONE, LINE_START, NONE,
new Insets(0, 0, 4, 0), new Insets(0, 0, 4, 0),
NONE, NONE)); NONE, NONE));
MiscPanel.add(Box.createRigidArea(new Dimension(5, 0)),
MiscPanel.add(acceptBellCheckbox,
new GridBagConstraints(0, 3, new GridBagConstraints(0, 3,
1, 1,
LIGHT, LIGHT,
LINE_START, NONE,
new Insets(0, 0, 4, 0),
NONE, NONE));
MiscPanel.add(Box.createRigidArea(new Dimension(5, 0)),
new GridBagConstraints(0, 4,
REMAINDER, REMAINDER, REMAINDER, REMAINDER,
HEAVY, HEAVY, HEAVY, HEAVY,
LINE_START, BOTH, LINE_START, BOTH,

+ 6
- 0
java/com/tigervnc/vncviewer/Parameters.java View File

"Show the dot cursor when the server sends an invisible cursor", "Show the dot cursor when the server sends an invisible cursor",
false); false);


public static BoolParameter largeCursorInsteadOfDot
= new BoolParameter("LargeCursorInsteadOfDot",
"Use a large cursor bitmap instead of a dot when using the dot cursor",
false);

public static BoolParameter sendLocalUsername public static BoolParameter sendLocalUsername
= new BoolParameter("SendLocalUsername", = new BoolParameter("SendLocalUsername",
"Send the local username for SecurityTypes "+ "Send the local username for SecurityTypes "+
CSecurityTLS.X509CRL, CSecurityTLS.X509CRL,
SecurityClient.secTypes, SecurityClient.secTypes,
dotWhenNoCursor, dotWhenNoCursor,
largeCursorInsteadOfDot,
autoSelect, autoSelect,
fullColor, fullColor,
lowColorLevel, lowColorLevel,

+ 45
- 3
java/com/tigervnc/vncviewer/Viewport.java View File

0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
}; };


static final int[] largecursor_xpm = {
0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0xff000000, 0xff000000, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};

public void setCursor(int width, int height, Point hotspot, public void setCursor(int width, int height, Point hotspot,
byte[] data) byte[] data)
{ {


if ((i == width*height) && dotWhenNoCursor.getValue()) { if ((i == width*height) && dotWhenNoCursor.getValue()) {
vlog.debug("cursor is empty - using dot"); vlog.debug("cursor is empty - using dot");
cursor = new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB_PRE);
cursor.setRGB(0, 0, 5, 5, dotcursor_xpm, 0, 5);
cursorHotspot.x = cursorHotspot.y = 3;
if (largeCursorInsteadOfDot.getValue()) {
cursor = new BufferedImage(18, 32, BufferedImage.TYPE_INT_ARGB_PRE);
cursor.setRGB(0, 0, 18, 32, largecursor_xpm, 0, 18);
cursorHotspot.x = cursorHotspot.y = 3;
} else {
cursor = new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB_PRE);
cursor.setRGB(0, 0, 5, 5, dotcursor_xpm, 0, 5);
cursorHotspot.x = cursorHotspot.y = 3;
}

} else { } else {
if ((width == 0) || (height == 0)) { if ((width == 0) || (height == 0)) {
cursor = new BufferedImage(tk.getBestCursorSize(0, 0).width, cursor = new BufferedImage(tk.getBestCursorSize(0, 0).width,

+ 9
- 0
vncviewer/OptionsDialog.cxx View File

sharedCheckbox->value(shared); sharedCheckbox->value(shared);
reconnectCheckbox->value(reconnectOnError); reconnectCheckbox->value(reconnectOnError);
dotCursorCheckbox->value(dotWhenNoCursor); dotCursorCheckbox->value(dotWhenNoCursor);
largeCursorInsteadOfDotCheckbox->value(largeCursorInsteadOfDot);
} }




shared.setParam(sharedCheckbox->value()); shared.setParam(sharedCheckbox->value());
reconnectOnError.setParam(reconnectCheckbox->value()); reconnectOnError.setParam(reconnectCheckbox->value());
dotWhenNoCursor.setParam(dotCursorCheckbox->value()); dotWhenNoCursor.setParam(dotCursorCheckbox->value());
largeCursorInsteadOfDot.setParam(largeCursorInsteadOfDotCheckbox->value());


std::map<OptionsCallback*, void*>::const_iterator iter; std::map<OptionsCallback*, void*>::const_iterator iter;


CHECK_MIN_WIDTH, CHECK_MIN_WIDTH,
CHECK_HEIGHT, CHECK_HEIGHT,
_("Show dot when no cursor"))); _("Show dot when no cursor")));

ty += CHECK_HEIGHT + TIGHT_MARGIN;

largeCursorInsteadOfDotCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty,
CHECK_MIN_WIDTH,
CHECK_HEIGHT,
_("Use large cursor instead of dot")));
ty += CHECK_HEIGHT + TIGHT_MARGIN; ty += CHECK_HEIGHT + TIGHT_MARGIN;
} }
ty -= TIGHT_MARGIN; ty -= TIGHT_MARGIN;

+ 1
- 0
vncviewer/OptionsDialog.h View File

Fl_Group *mouseGroup; Fl_Group *mouseGroup;
Fl_Check_Button *emulateMBCheckbox; Fl_Check_Button *emulateMBCheckbox;
Fl_Check_Button *dotCursorCheckbox; Fl_Check_Button *dotCursorCheckbox;
Fl_Check_Button *largeCursorInsteadOfDotCheckbox;
Fl_Group *keyboardGroup; Fl_Group *keyboardGroup;
Fl_Check_Button *systemKeysCheckbox; Fl_Check_Button *systemKeysCheckbox;
Fl_Choice *menuKeyChoice; Fl_Choice *menuKeyChoice;

+ 45
- 2
vncviewer/Viewport.cxx View File

" ... ", " ... ",
" "}; " "};


static const char * largecursor_xpm[] = {
"18 32 3 1",
". c #000000",
" c #FFFFFF",
", c None",
" ,,,,,,,,,,,,,,,,",
" ,,,,,,,,,,,,,,,",
" ,,,,,,,,,,,,,,",
" ,,,,,,,,,,,,,",
" . ,,,,,,,,,,,,",
" .. ,,,,,,,,,,,",
" ... ,,,,,,,,,,",
" .... ,,,,,,,,,",
" ..... ,,,,,,,,",
" ...... ,,,,,,,",
" ....... ,,,,,,",
" ........ ,,,,,",
" ......... ,,,,",
" .......... ,,,",
" ........... ,,",
" ............ ,",
" ............ ,",
" ......... ,,",
" .... ... ,,,,",
" ... ... ,,,,",
" .. ... ,,,",
" . ,, ... ,,,",
" ,,, ... ,,,",
",,,,,,, ... ,,,",
",,,,,,,, ... ,,,",
",,,,,,,,, ... ,,,",
",,,,,,,,, ,,,,",
",,,,,,,,,, ,,,,,",
",,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,"};

void Viewport::setCursor(int width, int height, const Point& hotspot, void Viewport::setCursor(int width, int height, const Point& hotspot,
const uint8_t* data) const uint8_t* data)
{ {
if ((i == width*height) && dotWhenNoCursor) { if ((i == width*height) && dotWhenNoCursor) {
vlog.debug("cursor is empty - using dot"); vlog.debug("cursor is empty - using dot");


Fl_Pixmap pxm(dotcursor_xpm);
cursor = new Fl_RGB_Image(&pxm);
Fl_Pixmap dotCursor(dotcursor_xpm);
Fl_Pixmap largeCursor(largecursor_xpm);
if (largeCursorInsteadOfDot) {
cursor = new Fl_RGB_Image(&largeCursor);
} else {
cursor = new Fl_RGB_Image(&dotCursor);
}
cursorHotspot.x = cursorHotspot.y = 2; cursorHotspot.x = cursorHotspot.y = 2;
} else { } else {
if ((width == 0) || (height == 0)) { if ((width == 0) || (height == 0)) {

+ 4
- 0
vncviewer/parameters.cxx View File

BoolParameter dotWhenNoCursor("DotWhenNoCursor", BoolParameter dotWhenNoCursor("DotWhenNoCursor",
"Show the dot cursor when the server sends an " "Show the dot cursor when the server sends an "
"invisible cursor", false); "invisible cursor", false);
BoolParameter largeCursorInsteadOfDot("LargeCursorInsteadOfDot",
"Use a large cursor bitmap instead of a dot "
"when using the dot cursor", false);


BoolParameter alertOnFatalError("AlertOnFatalError", BoolParameter alertOnFatalError("AlertOnFatalError",
"Give a dialog on connection problems rather " "Give a dialog on connection problems rather "
&viewOnly, &viewOnly,
&emulateMiddleButton, &emulateMiddleButton,
&dotWhenNoCursor, &dotWhenNoCursor,
&largeCursorInsteadOfDot,
&acceptClipboard, &acceptClipboard,
&sendClipboard, &sendClipboard,
#if !defined(WIN32) && !defined(__APPLE__) #if !defined(WIN32) && !defined(__APPLE__)

+ 1
- 0
vncviewer/parameters.h View File

extern rfb::IntParameter pointerEventInterval; extern rfb::IntParameter pointerEventInterval;
extern rfb::BoolParameter emulateMiddleButton; extern rfb::BoolParameter emulateMiddleButton;
extern rfb::BoolParameter dotWhenNoCursor; extern rfb::BoolParameter dotWhenNoCursor;
extern rfb::BoolParameter largeCursorInsteadOfDot;


extern rfb::StringParameter passwordFile; extern rfb::StringParameter passwordFile;



+ 4
- 0
vncviewer/vncviewer.man View File

Show the dot cursor when the server sends an invisible cursor. Default is off. Show the dot cursor when the server sends an invisible cursor. Default is off.
. .
.TP .TP
.B \-LargeCursorInsteadOfDot
Show a large cursor instead of a dot cursor (if enabled). Default is off.
.
.TP
.B \-PointerEventInterval \fItime\fP .B \-PointerEventInterval \fItime\fP
Time in milliseconds to rate-limit successive pointer events. Default is Time in milliseconds to rate-limit successive pointer events. Default is
17 ms (60 Hz). 17 ms (60 Hz).

Loading…
Cancel
Save