Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 546593

Summary: MarqueeOnDrag: Pressing without moving the mouse causes scrollbars to appear
Product: [Tools] GEF Reporter: Camille Letavernier <cletavernier>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: matthias.wienand, miklossy
Version: 5.0.0   
Target Milestone: 5.1.0 (2019-06)   
Hardware: All   
OS: All   
See Also: https://github.com/eclipse/gef/pull/64
Whiteboard:
Attachments:
Description Flags
Video presenting the issue
none
Video after the fix from PR 64 none

Description Camille Letavernier CLA 2019-04-19 10:25:25 EDT
When we start a marquee-on-drag movement, by pressing the mouse, and before we start moving, an empty rectangle feedback is added to the scene by MarqueeOnDragHandler, causing scrollbars to appear (I guess because the rectangle is added at 0; 0 by default?)

The scrollbars remain until we start moving the mouse; at this point the rectangle gets its correct coordinates and scrollbars are removed
Comment 1 Tamas Miklossy CLA 2019-04-19 11:52:31 EDT
Thanks for your bug report.

Would it be possible to upload a screenshot/screencast that represents the problem?
Comment 2 Camille Letavernier CLA 2019-04-24 11:07:47 EDT
Sure; I'll add an example (soon :) ). I've seen it happen in two different projects but I've not tested on GEF example applications yet, so I don't know what the minimal requirements are.

I'll post a screencast today or tomorrow
Comment 3 Camille Letavernier CLA 2019-04-25 03:35:19 EDT
Created attachment 278387 [details]
Video presenting the issue

Notice how scrollbars appear on each Mouse-Press event (When starting a Marquee-Selection, or even just when clicking around)
Comment 4 Camille Letavernier CLA 2019-04-25 03:37:25 EDT
Created attachment 278388 [details]
Video after the fix from PR 64

This video shows that scrollbars no longer appear when the patch is included (The feedback rectangle appears below the mouse rather than at 0; 0)
Comment 5 Camille Letavernier CLA 2019-04-25 03:39:22 EDT
Also note that the scrollbars only appear when the viewport is at its default location, because it needs to display the feedback rectangle at 0; 0 (With an outer border that probably goes around -1; -1). So if the viewport is already slightly scrolled to the top-left, the scrollbars wouldn't appear, with or without the patch.
Comment 6 Tamas Miklossy CLA 2019-04-25 03:40:59 EDT
Thank you very much for the videos!

Now it is much easier for us to understand the problem and the fix you provided.
Comment 7 Matthias Wienand CLA 2019-05-17 07:15:18 EDT
Thank you so much for the contribution! I just merged the PR onto master. Therefore, I resolve this ticket as fixed for 5.1.0 M3.