Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330682 - [hovering] tool tip positioned incorrectly with dual monitors
Summary: [hovering] tool tip positioned incorrectly with dual monitors
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux-GTK
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 352541 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-19 11:36 EST by Sami Wagiaalla CLA
Modified: 2016-07-13 14:21 EDT (History)
10 users (show)

See Also:


Attachments
tooltip over two screens (385.57 KB, image/png)
2010-11-26 10:42 EST, Sami Wagiaalla CLA
no flags Details
tooltip on one screens (411.58 KB, image/png)
2010-11-26 10:43 EST, Sami Wagiaalla CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Wagiaalla CLA 2010-11-19 11:36:30 EST
Build Identifier: M20100211-1343

Using CDT when I hover over say a function call a view of the declaration of the function opens up in a tooltip. With my dual monitor set this tooltip is split between the monitors making it harder to read.

My setup:
A laptop with an external monitor connected to it. The laptop is on the left and monitor to the right of it. I open eclipse in the right monitor. The problem occures when I hover over a function near the left edge of of the right monitor.

This problem seems to only happen with CDT and with this code view port kind of tooltip. Other tooltips work fine.

Reproducible: Always
Comment 1 Sami Wagiaalla CLA 2010-11-19 12:07:40 EST
Okay this bug is a little stranger than I thought, but I might have a small reproducer:

1. Create a C project
2. Create a C file
3. Add this code to the file:
   void foo ()
   {
     //loooooooooooooooooooooooooooooooooooooooooooooooooong line
   }
4. Move foo down the page by inserting new lines before it
5. When foo is near the bottom of the viewable page hover over
   foo and the tool tip will be split between monitors.

If foo is higher in the page the tool tip is displayed correctly
Comment 2 Anton Leherbauer CLA 2010-11-22 03:21:51 EST
CDT does not select the position of the hover popup.  This is done by the text hover framework.  Therefore I assume other Eclipse editors will show a similar behavior.  Could you try e.g. with a Java Editor?
Comment 3 Sami Wagiaalla CLA 2010-11-22 12:11:31 EST
You know I thought I tried before but this time I tried harder :)

I can reproduce with the java editor:

1. Create a java file with 
  public class Hello{
    public static void main(String[] argsssssssssssssssssssssssssssssssssssssssss) {
    }
  }

2. Move the class to the edge of the page same as before.
3. Hover over main
Comment 4 Anton Leherbauer CLA 2010-11-23 02:13:59 EST
Thanks, I'll move this bug to Platform then.
Comment 5 Markus Keller CLA 2010-11-25 08:59:48 EST
Could you please attach a screenshot of both screens that shows the tooltip in the bad position?

Bug 321290 has been fixed in 3.6 for a similar problem (but there, the problem was that the caret was out of sight).
Comment 6 Sami Wagiaalla CLA 2010-11-26 10:42:36 EST
Created attachment 183933 [details]
tooltip over two screens
Comment 7 Sami Wagiaalla CLA 2010-11-26 10:43:08 EST
Created attachment 183934 [details]
tooltip on one screens
Comment 8 Sami Wagiaalla CLA 2010-11-26 10:47:29 EST
Hmm... Taking the screenshot provided some insight:

As you can see from the screen shots my two screens are different sizes. I thought that might have something to do with it so I used the gnome monitor preferences applet (gnome-display-properties) to move my small screen so that it is aligned with the bottom of my big screen and once I did that the tooltip was position properly.

I included the gnome monitor preferences dialogue in the screenshots so you can see the alignment of the monitors.
Comment 9 Markus Keller CLA 2010-11-29 09:38:29 EST
Thanks for the screenshots. Unfortunately, I couldn't reproduce this under Windows 7 with 3.5.2 nor with HEAD (same screen resolutions and same logical screen locations).

Entry point for debugging:
org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(Rectangle, Object)

I checked our code again, but I don't see any way for this to fail. I suspect a bug somewhere in SWT around the Monitor APIs. I don't have a Linux box with dual screens, so I currently can't debug it on GTK.
Comment 10 Sami Wagiaalla CLA 2010-11-29 14:32:34 EST
Okay. Thanks for looking into this and being so responsive. If you ever get a change to try it on a Linux box that would be great.
Comment 11 Dani Megert CLA 2011-07-20 04:22:06 EDT
*** Bug 352541 has been marked as a duplicate of this bug. ***
Comment 12 Leo Ufimtsev CLA 2014-11-12 10:38:33 EST
I can reporoduce it on Fedora 20/21 with Eclipse Luna 4.4.1 (as well as with Mars) Gtk2 & Gtk3. 

It is something I could look into once bug 428852 bug 439884 are fixed. I added this to my (long) todo list :-)
Comment 13 Alexander Kurtakov CLA 2016-07-12 16:10:29 EDT
Leo, Is this bug still valid?
Comment 14 Leo Ufimtsev CLA 2016-07-13 14:21:36 EDT
This bug doesn't occur anymore actually. Thanks for ping.
Comment 15 Leo Ufimtsev CLA 2016-07-13 14:21:56 EDT
Gtk3.20 w/ Neo anyway.