Selaa lähdekoodia

Merge 06ea8efb04 into 6d19e961e2

pull/1491/merge
krystof1119 2 viikkoa sitten
vanhempi
commit
e8f6f54aee
No account linked to committer's email address

+ 13
- 2
java/com/tigervnc/vncviewer/OptionsDialog.java Näytä tiedosto

@@ -153,6 +153,7 @@ class OptionsDialog extends Dialog {
/* Misc. */
JCheckBox sharedCheckbox;
JCheckBox dotWhenNoCursorCheckbox;
JCheckBox largeCursorInsteadOfDotCheckbox;
JCheckBox acceptBellCheckbox;

/* SSH */
@@ -459,6 +460,7 @@ class OptionsDialog extends Dialog {
/* Misc. */
sharedCheckbox.setSelected(shared.getValue());
dotWhenNoCursorCheckbox.setSelected(dotWhenNoCursor.getValue());
largeCursorInsteadOfDotCheckbox.setSelected(largeCursorInsteadOfDot.getValue());
acceptBellCheckbox.setSelected(acceptBell.getValue());

/* SSH */
@@ -614,6 +616,7 @@ class OptionsDialog extends Dialog {
/* Misc. */
shared.setParam(sharedCheckbox.isSelected());
dotWhenNoCursor.setParam(dotWhenNoCursorCheckbox.isSelected());
largeCursorInsteadOfDot.setParam(largeCursorInsteadOfDotCheckbox.isSelected());
acceptBell.setParam(acceptBellCheckbox.isSelected());

/* SSH */
@@ -1174,6 +1177,7 @@ class OptionsDialog extends Dialog {
sharedCheckbox =
new JCheckBox("Shared (don't disconnect other viewers)");
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");
MiscPanel.add(sharedCheckbox,
new GridBagConstraints(0, 0,
@@ -1189,15 +1193,22 @@ class OptionsDialog extends Dialog {
LINE_START, NONE,
new Insets(0, 0, 4, 0),
NONE, NONE));
MiscPanel.add(acceptBellCheckbox,
MiscPanel.add(largeCursorInsteadOfDotCheckbox,
new GridBagConstraints(0, 2,
1, 1,
LIGHT, LIGHT,
LINE_START, NONE,
new Insets(0, 0, 4, 0),
NONE, NONE));
MiscPanel.add(Box.createRigidArea(new Dimension(5, 0)),
MiscPanel.add(acceptBellCheckbox,
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,
HEAVY, HEAVY,
LINE_START, BOTH,

+ 6
- 0
java/com/tigervnc/vncviewer/Parameters.java Näytä tiedosto

@@ -43,6 +43,11 @@ public class Parameters {
"Show the dot cursor when the server sends an invisible cursor",
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
= new BoolParameter("SendLocalUsername",
"Send the local username for SecurityTypes "+
@@ -283,6 +288,7 @@ public class Parameters {
CSecurityTLS.X509CRL,
SecurityClient.secTypes,
dotWhenNoCursor,
largeCursorInsteadOfDot,
autoSelect,
fullColor,
lowColorLevel,

+ 45
- 3
java/com/tigervnc/vncviewer/Viewport.java Näytä tiedosto

@@ -156,6 +156,41 @@ class Viewport extends JPanel implements ActionListener {
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,
byte[] data)
{
@@ -169,9 +204,16 @@ class Viewport extends JPanel implements ActionListener {

if ((i == width*height) && dotWhenNoCursor.getValue()) {
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 {
if ((width == 0) || (height == 0)) {
cursor = new BufferedImage(tk.getBestCursorSize(0, 0).width,

+ 9
- 0
vncviewer/OptionsDialog.cxx Näytä tiedosto

@@ -355,6 +355,7 @@ void OptionsDialog::loadOptions(void)
sharedCheckbox->value(shared);
reconnectCheckbox->value(reconnectOnError);
dotCursorCheckbox->value(dotWhenNoCursor);
largeCursorInsteadOfDotCheckbox->value(largeCursorInsteadOfDot);
}


@@ -489,6 +490,7 @@ void OptionsDialog::storeOptions(void)
shared.setParam(sharedCheckbox->value());
reconnectOnError.setParam(reconnectCheckbox->value());
dotWhenNoCursor.setParam(dotCursorCheckbox->value());
largeCursorInsteadOfDot.setParam(largeCursorInsteadOfDotCheckbox->value());

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

@@ -841,6 +843,13 @@ void OptionsDialog::createInputPage(int tx, int ty, int tw, int th)
CHECK_MIN_WIDTH,
CHECK_HEIGHT,
_("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 -= TIGHT_MARGIN;

+ 1
- 0
vncviewer/OptionsDialog.h Näytä tiedosto

@@ -116,6 +116,7 @@ protected:
Fl_Group *mouseGroup;
Fl_Check_Button *emulateMBCheckbox;
Fl_Check_Button *dotCursorCheckbox;
Fl_Check_Button *largeCursorInsteadOfDotCheckbox;
Fl_Group *keyboardGroup;
Fl_Check_Button *systemKeysCheckbox;
Fl_Choice *menuKeyChoice;

+ 45
- 2
vncviewer/Viewport.cxx Näytä tiedosto

@@ -245,6 +245,44 @@ static const char * dotcursor_xpm[] = {
" ... ",
" "};

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,
const uint8_t* data)
{
@@ -262,8 +300,13 @@ void Viewport::setCursor(int width, int height, const Point& hotspot,
if ((i == width*height) && dotWhenNoCursor) {
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;
} else {
if ((width == 0) || (height == 0)) {

+ 4
- 0
vncviewer/parameters.cxx Näytä tiedosto

@@ -63,6 +63,9 @@ BoolParameter emulateMiddleButton("EmulateMiddleButton",
BoolParameter dotWhenNoCursor("DotWhenNoCursor",
"Show the dot cursor when the server sends an "
"invisible cursor", false);
BoolParameter largeCursorInsteadOfDot("LargeCursorInsteadOfDot",
"Use a large cursor bitmap instead of a dot "
"when using the dot cursor", false);

BoolParameter alertOnFatalError("AlertOnFatalError",
"Give a dialog on connection problems rather "
@@ -199,6 +202,7 @@ static VoidParameter* parameterArray[] = {
&viewOnly,
&emulateMiddleButton,
&dotWhenNoCursor,
&largeCursorInsteadOfDot,
&acceptClipboard,
&sendClipboard,
#if !defined(WIN32) && !defined(__APPLE__)

+ 1
- 0
vncviewer/parameters.h Näytä tiedosto

@@ -34,6 +34,7 @@
extern rfb::IntParameter pointerEventInterval;
extern rfb::BoolParameter emulateMiddleButton;
extern rfb::BoolParameter dotWhenNoCursor;
extern rfb::BoolParameter largeCursorInsteadOfDot;

extern rfb::StringParameter passwordFile;


+ 4
- 0
vncviewer/vncviewer.man Näytä tiedosto

@@ -286,6 +286,10 @@ Use custom compression level. Default if \fBCompressLevel\fP is specified.
Show the dot cursor when the server sends an invisible cursor. Default is off.
.
.TP
.B \-LargeCursorInsteadOfDot
Show a large cursor instead of a dot cursor (if enabled). Default is off.
.
.TP
.B \-PointerEventInterval \fItime\fP
Time in milliseconds to rate-limit successive pointer events. Default is
17 ms (60 Hz).

Loading…
Peruuta
Tallenna