Superfluous java scrollbars

Should you have problems with the JavaViewer, here's the place to look for help or report issues.

Superfluous java scrollbars

Postby gid13 » 2009-01-22 13:58

I understand that it is normal to get scrollbars if the remote screen is larger than the local one.

However, in the java viewer, if I scroll to bottom right using these, there is another set of scrollbars. This is extremely annoying.

I am using the java viewer in Firefox in case that information helps.

Thanks in advance,
Gideon
gid13
 
Posts: 4
Joined: 2009-01-22 13:54

Re: Superfluous java scrollbars

Postby gid13 » 2009-01-23 14:07

Note: even if the remote screen is smaller than the available space in the Firefox window, there are still extra annoying scrollbars. Here is a screenshot:

Image
gid13
 
Posts: 4
Joined: 2009-01-22 13:54

Re: Superfluous java scrollbars

Postby gid13 » 2009-01-26 16:34

I don't know a lot about java, but I'm willing to bet this problem happens somewhere in here (from VncViewer.java):

Code: Select all
  189    // Add ScrollPanel to applet mode
  190
  191    // Create a panel which itself is resizeable and can hold
  192    // non-resizeable VncCanvas component at the top left corner.
  193    Panel canvasPanel = new Panel();
  194    canvasPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
  195    canvasPanel.add(vc);
  196
  197    // Create a ScrollPane which will hold a panel with VncCanvas
  198    // inside.
  199    desktopScrollPane = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
  200    gbc.fill = GridBagConstraints.BOTH;
  201    gridbag.setConstraints(desktopScrollPane, gbc);
  202    desktopScrollPane.add(canvasPanel);
  203
  204       if (inSeparateFrame) {
  205    // Finally, add our ScrollPane to the Frame window.
  206    vncFrame.add(desktopScrollPane);
  207    vncFrame.setTitle(rfb.desktopName);
  208    vncFrame.pack();
  209    vc.resizeDesktopFrame();
  210       } else {
  211    // Finally, add the scrollable panel component to the Applet.
  212         gridbag.setConstraints(desktopScrollPane, gbc);
  213    add(desktopScrollPane);
  214
  215    // Add ScrollPanel to applet mode end
  216
  217    validate();
  218
  219       }
gid13
 
Posts: 4
Joined: 2009-01-22 13:54

Re: Superfluous java scrollbars

Postby bz922x » 2009-12-05 01:27

While there might be a problem in the VncViewer Java code, changing the embedding code will clear out the scrollbars. I used Firebug in Firefox to add 4 pixels to the embed width. The additional width cleared the scrollbars.

This code has superfluous scroll bars:
<HTML>
<HEAD><TITLE> [mrpotatoe] </TITLE></HEAD>
<BODY>
<SPAN style='position: absolute; top:0px;left:0px'>
<OBJECT
ID='VncViewer'
classid = 'clsid:8AD9C840-044E-11D1-B3E9-00805F499D93'
codebase = 'http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0'
WIDTH = 1280 HEIGHT = 800 >
<PARAM NAME = CODE VALUE = VncViewer.class >
<PARAM NAME = ARCHIVE VALUE = VncViewer.jar >
<PARAM NAME = 'type' VALUE = 'application/x-java-applet;version=1.4'>
<PARAM NAME = 'scriptable' VALUE = 'false'>
<PARAM NAME = PORT VALUE=5900>
<PARAM NAME = ENCODING VALUE=Tight>
<PARAM NAME = 'Open New Window' VALUE='Yes'>
<COMMENT>
<EMBED
type = 'application/x-java-applet;version=1.4' \
CODE = VncViewer.class \
ARCHIVE = VncViewer.jar \
WIDTH = 1280 \
HEIGHT = 800 \
PORT =5900 \
ENCODING =Tight \
scriptable = false \
pluginspage ='http://java.sun.com/products/plugin/index.html#download'>
<NOEMBED>
</NOEMBED>
</EMBED>
</COMMENT>
</OBJECT>
</SPAN>
</BODY>
</HTML>


This code does not:
<HTML>
<HEAD><TITLE> [mrpotatoe] </TITLE></HEAD>
<BODY>
<SPAN style='position: absolute; top:0px;left:0px'>
<OBJECT
ID='VncViewer'
classid = 'clsid:8AD9C840-044E-11D1-B3E9-00805F499D93'
codebase = 'http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0'
WIDTH = 1284 HEIGHT = 800 >
<PARAM NAME = CODE VALUE = VncViewer.class >
<PARAM NAME = ARCHIVE VALUE = VncViewer.jar >
<PARAM NAME = 'type' VALUE = 'application/x-java-applet;version=1.4'>
<PARAM NAME = 'scriptable' VALUE = 'false'>
<PARAM NAME = PORT VALUE=5900>
<PARAM NAME = ENCODING VALUE=Tight>
<PARAM NAME = 'Open New Window' VALUE='Yes'>
<COMMENT>
<EMBED
type = 'application/x-java-applet;version=1.4' \
CODE = VncViewer.class \
ARCHIVE = VncViewer.jar \
WIDTH = 1284 \
HEIGHT = 800 \
PORT =5900 \
ENCODING =Tight \
scriptable = false \
pluginspage ='http://java.sun.com/products/plugin/index.html#download'>
<NOEMBED>
</NOEMBED>
</EMBED>
</COMMENT>
</OBJECT>
</SPAN>
</BODY>
</HTML>


It looks like I need to change vnchttpconnect.cpp
374 // Send the java applet page
375 sprintf(indexpage, HTTP_FMT_INDEX,
376 desktopname, width, height+32,
377 m_server->GetPort(), width, height+32,
378 m_server->GetPort()
379 );

to
374 // Send the java applet page
375 sprintf(indexpage, HTTP_FMT_INDEX,
376 desktopname, width+4, height+32,
377 m_server->GetPort(), width+4, height+32,
378 m_server->GetPort()
379 );


Then recompile and test. I have never build UltraVNC from source before, so any assistance or advice would be welcome.
Last edited by bz922x on 2009-12-05 01:57, edited 1 time in total.
bz922x
 
Posts: 7
Joined: 2005-07-04 16:57

Re: Superfluous java scrollbars

Postby bz922x » 2009-12-10 01:34

Devs,

Thanks to Rudi's help, I have been able to build and test winvnc incorporating the change above.

I after testing in Firefox, IE8, Chrome, and Opera, I find that there are no superfluous scrollbars when this change is made to vnchttpconnect.cpp:

Code: Select all
374 // Send the java applet page
375 sprintf(indexpage, HTTP_FMT_INDEX,
376    desktopname, width, height+32,
377    m_server->GetPort(), width+4, height+32,
378    m_server->GetPort()
379    );


The additional 4 pixels of width on line 377 seem to be required by Firefox when it embeds a Java applet. The width in line 376 is not used by Firefox so it does not need to be changed.

Could this change be incorporated into the next build?

Thanks,
Tom Goodman
bz922x
 
Posts: 7
Joined: 2005-07-04 16:57

Re: Superfluous java scrollbars

Postby roknir » 2010-09-21 04:37

Does anyone know if this has been fixed yet? I'm having the same problem in 1.0.6.5.
roknir
 
Posts: 2
Joined: 2010-09-21 04:29

Re: Superfluous java scrollbars

Postby Pow » 2011-05-20 19:49

Digging this up as I just witnessed this issue and stumbled on this thread about it. It is not fixed as far as the Win x64 version 10961 Beta. Looks great in IE but in Firefox (Nightly 6.0a1) I get the scrollbars.
Pow
 
Posts: 2
Joined: 2011-05-20 19:44

Re: Superfluous java scrollbars

Postby redge » 2011-05-31 00:21

java part was not updated at all. only java certificate and patch for mslogon for RFB protocol 3.8, no more update
there a lot of bugs report about java, but there no java developers...have a lot but not for free software...
like:
network error only after vnc authentication.
or
change color palette and codec and there no more screen update after Ctrl+Alt+Del.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva


Return to JavaViewer

Who is online

Users browsing this forum: No registered users and 2 guests