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

Bug 522140

Summary: [GTK] Horizontal SashForm resize problem
Product: [Eclipse Project] Platform Reporter: Pavel Matveev <pmatveev42>
Component: SWTAssignee: Eric Williams <ericwill>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aburdukov, ericwill
Version: 4.6Keywords: triaged
Target Milestone: 4.8 M7   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/120907
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=08e087b2294d547e33246d957891edc34a1974ea
Whiteboard:
Attachments:
Description Flags
Eclipse Installation Details Dialog none

Description Pavel Matveev CLA 2017-09-11 09:22:05 EDT
Created attachment 270154 [details]
Eclipse Installation Details Dialog

Can not resize sash after a quick resizing
Seems to be bug since 18 Aug 2007...
See setBoundsInPixels args in org.eclipse.swt.widgets.Sash#gtk_motion_notify_event.
It works fine after replace
setBoundsInPixels(rect.x, lastY, width, height) 
with
setBoundsInPixels(lastX, lastY, width, height)
Comment 1 Eric Williams CLA 2018-03-28 11:45:04 EDT
Is this issue still reproducible? What are your OS and GTK details/versions?
Comment 2 Eric Williams CLA 2018-04-04 11:23:16 EDT
Okay I can confirm the issue still happens on 4.8 M6.
Comment 3 Eclipse Genie CLA 2018-04-09 14:20:55 EDT
New Gerrit change created: https://git.eclipse.org/r/120907
Comment 4 Eric Williams CLA 2018-04-09 14:38:44 EDT
I've made a patch that uses the suggestions from comment 1. 

I believe the issue is that when resizing quickly, the x coordinate chosen for rect.x is different than usual and is large. The variable lastX is only set to rect.x when event.doit is true. When resizing quickly, event.doit is false, however we always use rect.x for setBounds() instead of lastX. The large coordinate for rect.x then causes the bug.

I'll continue to test/investigate.
Comment 6 Eric Williams CLA 2018-04-09 16:33:29 EDT
(In reply to Eclipse Genie from comment #5)
> Gerrit change https://git.eclipse.org/r/120907 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=08e087b2294d547e33246d957891edc34a1974ea

Patch is in master. Thanks for the help with the investigation Pavel!
Comment 7 Eric Williams CLA 2018-04-11 11:30:01 EDT
*** Bug 475313 has been marked as a duplicate of this bug. ***
Comment 8 Eric Williams CLA 2018-05-08 10:28:11 EDT
Verified in I20180507-2205.