xpra icon
Bug tracker and wiki

Opened 9 months ago

Closed 8 months ago

Last modified 6 months ago

#1411 closed defect (needinfo)

Misplaced Java Menu in Dual Screen

Reported by: adarrab Owned by: adarrab
Priority: major Milestone:
Component: server Version: 1.0.x
Keywords: Java Menu Dual-Screen Cc:

Description

Hi,

Happens with some java applications, when you launch them on monitor 1, then drag the main window to monitor 2, clicking on the menu will launch the menu in monitor 1.

If the application stays in monitor 1 (where it started) then the menu appears where it should. The problem only when the main is moved to the second monitor.

Server: CentOS 6.5 (xpra v1.0.1-r14734)
Client: Windows 7 64 (xpra 1.0.2-r14780). Dual display 1920x1200 - Orientation: Landscape, mode: Extended.

To reproduce, you can use the simple java application "policytool"

xpra start :100 --start-child=policytool --dpi=96
xpra.exe  attach SERVER123:100

Attachments (3)

image.jpeg (161.4 KB) - added by adarrab 9 months ago.
screenshot
Xpra_Defect_1411.log (92.5 KB) - added by adarrab 9 months ago.
log file
Xpra_Defect_1411.jpg (126.1 KB) - added by adarrab 9 months ago.
Screenshot 2

Download all attachments as: .zip

Change History (15)

comment:1 Changed 9 months ago by adarrab

Component: clientserver

After few more tests, I think the problem is with recent versions of server component.

Server (xpra v0.15.5) with Client (1.0.2-r14780) is working fine.

Best regards,

Last edited 9 months ago by adarrab (previous) (diff)

comment:2 Changed 9 months ago by Antoine Martin

Owner: changed from Antoine Martin to adarrab

I cannot reproduce: I've tried with JDK 5, 6, 7 and 8 on Fedora, and openjdk 1.7.0.121 on centos 6.8, all connecting from a dual monitor Windows 7 Ultimate running 1.0.2.

If you can still reproduce this bug, please include a screenshot and post the client and server output when running with the debug option "-d geometry".

comment:3 in reply to:  2 Changed 9 months ago by adarrab

Replying to Antoine Martin:

I cannot reproduce: I've tried with JDK 5, 6, 7 and 8 on Fedora, and openjdk 1.7.0.121 on centos 6.8, all connecting from a dual monitor Windows 7 Ultimate running 1.0.2.

If you can still reproduce this bug, please include a screenshot and post the client and server output when running with the debug option "-d geometry".


I guess there are other variables i.e. tried "policytool" on RHEL 6.6 and couldn't reproduce the problem.

I'll try to reproduce it on a wide range of RHEL/Centos releases and get back to you.

comment:4 Changed 9 months ago by adarrab

Ok it is java dependant

1.8.0_101 (Working fine)
1.7.0_40 (bug occurs)
1.6_64 (bug occurs)

Here is a simple code to reproduce:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class menu extends JPanel implements ActionListener {

	public menu() {	}
	public void actionPerformed(ActionEvent e) {}

	public static void main(String[] args) {
		JFrame frame = new JFrame();
		JMenuBar menuBar = new JMenuBar();
		JMenu fileMenu = new JMenu("File");
		JMenuItem openMenuItem = new JMenuItem("Open");
		JMenuItem item1 = new JMenuItem("item1");
		JMenuItem item2 = new JMenuItem("item2");
		JMenuItem item3 = new JMenuItem("item3");
		JMenuItem item4 = new JMenuItem("item4");
		JMenuItem item5 = new JMenuItem("item5");

		fileMenu.add(openMenuItem);
		fileMenu.add(item1);
		fileMenu.add(item2);
		fileMenu.add(item3);
		fileMenu.add(item4);
		fileMenu.add(item5);

		menuBar.add(fileMenu);
		frame.setJMenuBar(menuBar);
		frame.setTitle("Java Menu");
		frame.setSize(300, 200);
		frame.addWindowListener(new WindowAdapter() {

			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});
		Container contentPane = frame.getContentPane();
		contentPane.add(new menu());
		frame.setVisible(true);
	}
}

Save as menu.java
Compile: javac menu.java
run: java menu

with jdk1.6_64 or 1.7.0_40 , the problem appears when running on xpra server (xpra v1.0.1-r14734) and client (1.0.2-r14780)

Thanks,

Changed 9 months ago by adarrab

Attachment: image.jpeg added

screenshot

comment:5 Changed 9 months ago by Antoine Martin

Not the first time that Java does odd things with window management (#770, #705 and many more).

Please try with an up to date version of each JDK:

Please also make sure that your server system uses the patched dummy driver, and include "xpra info" for one of the "buggy" running instances.

Changed 9 months ago by adarrab

Attachment: Xpra_Defect_1411.log added

log file

comment:6 Changed 9 months ago by adarrab

Log is attached,

Unfortunately, controlling java is not always possible especially that applications are provided by different vendors and some ship with their own runtime. Of course ideally will use the java that works, but I was hoping for a fix within Xpra since that older release 0.15.5 doesn’t have this issue.

Thank you,

comment:7 Changed 9 months ago by Antoine Martin

Still cannot reproduce, I've tried your example running on a Fedora 25 which had an old JDK 1.6 already installed, I also installed the latest 1.6 SDK on a centos 6.8 system.
(and connected from a win7 system with dual 1920x1440 displays)
There must be something else at play here.

Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:8 Changed 9 months ago by adarrab

The same steps reproduces it on Centos 6.5 , Java 1.7.0_45.

Since you have Centos 6.8, I'll download it and try to reproduce it there.

Best regards,

comment:9 Changed 9 months ago by adarrab

I installed a fresh copy of CentOS 6.8 (final)
Also installed:

  • java-1.7.0-openjdk & java-1.7.0-openjdk-devel (1.7.0_121)


Same problem and it is reproducible using the procedure above with the simple menu.java example.

I've attached another snapshot of my other windows machine (mentioned in the initial inquiry) the problem in this one is that the menu is stuck to the edge of the screen and can't pass to the second one.

Any hints on what else I can do to get to the root cause?

Last edited 9 months ago by adarrab (previous) (diff)

Changed 9 months ago by adarrab

Attachment: Xpra_Defect_1411.jpg added

Screenshot 2

comment:10 Changed 9 months ago by Antoine Martin

I definitely cannot reproduce the bug with this setup. I've just tried again.

So there must be a difference between what you're doing and how I am trying to reproduce it.
Please try to answer as many questions as possible from wiki/ReportingBugs.
Maybe your installation is different? Maybe a package is missing? (patched dummy driver? etc)
Please post your full (minimal) list of packages for reproducing the problem. Exact command lines, etc.

Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:11 Changed 8 months ago by Antoine Martin

Resolution: needinfo
Status: newclosed

Not heard back, closing.

comment:12 Changed 6 months ago by adarrab

This bug is actually gone with xpra-1.0.6-1.r15523 (server on CentOS 6.8)

Tried many clients from the 1.x branch and they all seem to work fine (1.0.5-r15455 ; 1.0.2-r14941 ; 1.0.2-r14780 ; 1.0.1-r14723)

So, I guess this was a server bug which was resolved somewhere between 1.0.1 - 1.0.6

Thanks,

Note: See TracTickets for help on using tickets.