This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 204566 - [dual monitor] wrong window widths on primary/left monitor
Summary: [dual monitor] wrong window widths on primary/left monitor
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: DUAL_MONITOR, UI
Depends on:
Blocks:
 
Reported: 2011-11-02 09:26 UTC by gnSascha
Modified: 2013-08-12 09:24 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
WindowManager file after deleting the Windows2Local folder and starting NB (1.10 KB, text/plain)
2011-11-02 09:26 UTC, gnSascha
Details
my xorg.conf (2.88 KB, text/plain)
2011-11-02 09:27 UTC, gnSascha
Details
an image of the find in projects dialog (14.99 KB, image/png)
2011-11-02 09:31 UTC, gnSascha
Details
Java Program to detect Screen Parameters (832 bytes, application/octet-stream)
2012-03-27 11:22 UTC, gnSascha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gnSascha 2011-11-02 09:26:07 UTC
Created attachment 112715 [details]
WindowManager file after deleting the Windows2Local folder and starting NB

On starting, Netbeans height is right, but width is 107px (see attached WindowManager.wswmgr). One can fix that by manually editing ~/.netbeans/7.0/config/Windows2Local/WindowManager.wswmgr

If I pull NB to the secondary monitor and maximize, everything seems fine. But when I use the main monitor, all dialogs I've tested are very small and have to be resized before one can use them. Dialogs come up small every time, even if the were resized before closing. 

The width of dialogs varies. The tools - options dialog is rather usable (416px). The tools - plugins dialog has very small width of 98px. The find in projects dialog is unusable small (232px) and the one for the general password too.

I get the same behavior with 7.0.1 and 7.1beta.

Environment:

I use 2 screens in xinerama mode with separate x screen. Height is 1200 each. Combined width is 3520 (main/left:1920 + secondary/right:1600). 

java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.23.1.9.10.el5_7-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Linux xxxx7 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 gnSascha 2011-11-02 09:27:04 UTC
Created attachment 112716 [details]
my xorg.conf
Comment 2 gnSascha 2011-11-02 09:31:55 UTC
Created attachment 112717 [details]
an image of the find in projects dialog

this is how the find in projects-dialog opens every time (on the left/main monitor).
Comment 3 gnSascha 2011-11-02 09:36:14 UTC
I use KDE Version 3.5.10-1.el5
Comment 4 Stanislav Aubrecht 2011-11-02 10:41:26 UTC
is this reproducible with oracle JDK?
Comment 5 gnSascha 2011-11-02 11:47:41 UTC
As far as i can see: still same behavior.

I installed the jdk-7u1-linux-x64.rpm from oracle.com and configured NB to use it.

Netbeans Help - About now tells me:

Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.7.0_01; Java HotSpot(TM) 64-Bit Server VM 21.1-b02
System: Linux version 2.6.18-274.3.1.el5 running on amd64; UTF-8; de_DE (nb)
Comment 6 gnSascha 2011-11-25 11:39:36 UTC
Raised Prio to P2 because the bug is a variant of: "Window or part of a window does not dynamically resize to show all of it (up to maximum limit of screen size for entire window) when using default font size." from the BugPriorityGuidlines
Comment 7 Stanislav Aubrecht 2012-03-27 10:47:40 UTC
Please execute the following Java code, attach results and reopen this bug, thanks.

GraphicsConfiguration gconf = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();

System.out.println(gconf.getBounds());

System.out.println(Toolkit.getDefaultToolkit().getScreenInsets(gconf));

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
for( int j=0; j<gs.length; j++ ) { 
  GraphicsDevice gd = gs[j];
  if( gd.getType() != GraphicsDevice.TYPE_RASTER_SCREEN )
    continue;
  System.out.println(gd.getDefaultConfiguration().getBounds());
}
Comment 8 gnSascha 2012-03-27 11:22:51 UTC
Created attachment 117312 [details]
Java Program to detect Screen Parameters
Comment 9 gnSascha 2012-03-27 11:32:43 UTC
% java -version                                                        
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
% javac ScreenTest.java                                                
% java ScreenTest                                                      
java.awt.Rectangle[x=0,y=0,width=1920,height=1200]
java.awt.Insets[top=0,left=0,bottom=0,right=1811]
java.awt.Rectangle[x=0,y=0,width=1920,height=1200]
java.awt.Rectangle[x=1920,y=0,width=1600,height=1200]
%

PS: Next time, could you please post running code? I didn't touch java since
university. :-)
Comment 10 Stanislav Aubrecht 2012-03-27 11:40:57 UTC
It seems to be linux issue. For some reason Java reports insets of 1811 pixels at the right edge of the primary screen. Can you try updating your graphics drivers?

Or try running netbeans with this command line switch:
-J-Dnetbeans.screen.insets=0,0,0,0
Comment 11 gnSascha 2012-03-27 14:46:06 UTC
I don't think the issue was fixed in the nvidia-driver. I develop CAE software and change and update video drivers quite often while the problem persisted.

For the posterity: I added "-J-Dnetbeans.screen.insets=0,0,0,0" to the list of netbeans_default_options in "/usr/local/netbeans-7.1/etc/netbeans.conf" and it worked.

I don't know if this can be called a "fix", but I think it is a very viable solution. Thanks a lot.
Comment 12 stewert 2013-08-07 09:30:04 UTC
Bug it's still alive in NetBeans IDE 7.3 (Build 201306052037).

In my opinion this is not a fix. This is only a work around. Because at the moment every developer which works on Linux with MultHead must update the netbeans.conf file after installing NetBeans (and he must known that he must edit the config to prevent the dialog window size bug) ...
Comment 13 Stanislav Aubrecht 2013-08-12 09:24:35 UTC
It's a JDK bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9000030We can't fix it in NetBeans, only work around it.