Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-07-09Bug 340752 - [GTK3] Control getSize() behaves different in Linux andXi Yan1-108/+121
Windows. Getting wrong value on linux Removed visible check in ExpandItem#resizeControl to set bounds for items not expanded. Change-Id: Ibb926eb7784113d5b800eb236d8432a35e6f9df5 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-07-03Bug 475784: half transparent composite as overlay composite not workEric Williams1-0/+248
with gtk3 ATTEMPT #2: fix regression from original patch. Instead of keeping the NO_BACKGROUND flag, cache it in Control and remove it as intended in Composite.checkStyle(). Original commit message: We have to handle some corner case drawing situations, since Control.setRegion() now uses Cairo entirely. In particular, we need to handle the case where a user is using an SWT.NO_BACKGROUND Composite as an overlay. This means the Composite has a region set, and a paintListener attached to perform custom drawing. Previously, Control.setRegion() "physically" manipulate the Composite's GdkWindow to prevent any drawing outside the given region. Since Cairo is now responsible for drawing the set region we have to handle this geometry ourselves. This patch fixes numerous issues all rolled into one. First, it adds a field in GCData which corresponds to the Cairo region. This is set in gtk_draw() so that GC.fill* methods will clip themselves accordingly and not fill where they aren't supposed to. Second, it checks for a PaintListener, NO_BACKGROUND, and a region being set. If these conditions are met, we draw a transparent background in Control.drawBackground() to ensure the region and custom drawing succeeds. Last, we copy the region at the Cairo level to ensure there are no crashes when calling setRegion(region) followed by region.dispose(). Tested on GTK3.22 using the snippet attached and a child Eclipse. No AllNonBrowser JUnit tests fail. Change-Id: I6a6245052e9756d6c9bdd0e46ef20a74413acc6b Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-07-02Revert "Bug 475784: half transparent composite as overlay composite not work ↵Andrey Loskutov1-248/+0
with gtk3" This reverts commit 70cce8be1320532905ef82171b46309da5c59bc7.
2018-06-29Bug 475784: half transparent composite as overlay composite not workEric Williams1-0/+248
with gtk3 We have to handle some corner case drawing situations, since Control.setRegion() now uses Cairo entirely. In particular, we need to handle the case where a user is using an SWT.NO_BACKGROUND Composite as an overlay. This means the Composite has a region set, and a paintListener attached to perform custom drawing. Previously, Control.setRegion() "physically" manipulate the Composite's GdkWindow to prevent any drawing outside the given region. Since Cairo is now responsible for drawing the set region we have to handle this geometry ourselves. This patch fixes numerous issues all rolled into one. First, it adds a field in GCData which corresponds to the Cairo region. This is set in gtk_draw() so that GC.fill* methods will clip themselves accordingly and not fill where they aren't supposed to. Second, it checks for a PaintListener, NO_BACKGROUND, and a region being set. If these conditions are met, we draw a transparent background in Control.drawBackground() to ensure the region and custom drawing succeeds. Last, we copy the region at the Cairo level to ensure there are no crashes when calling setRegion(region) followed by region.dispose(). Tested on GTK3.22 using the snippet attached and a child Eclipse. No AllNonBrowser JUnit tests fail. Change-Id: Icdd04d8a4e0e504a5ee69688ba304af3956e4f77 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-06-26Bug 302171 - Characters requiring <Alt Gr> cannot be generated usingXi Yan1-0/+105
Display.post(Event) 1) Added SWT.ALT_GR constant mapping to ISO_Level3_Shift (0xfe03). 2) Replaced OS.XTestFakeKeyEvent in Display.post, which only supported US keyboards, with gdk_test_simulate_key to simulate key event. Added the option to send key modifier together with key character in a single event to Display.post on GTK. Change-Id: I97311e639b612ac1f6aed23beb68034f40d211b1 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-06-20Bug 535124: CSS tree selection issue on Linux onlyEric Williams1-0/+66
This patch reverts some changes made to custom drawn Trees which fixed bugs on lower versions of GTK3 (3.14 and below). Unfortunately these changes broke some basic Tree selection background/foreground drawing. On GTK3 we need to use the clipping from the cairo context provided by the gtk_cell_renderer_render() function. It provides the x and width values. The y and height values can continue to be fetched via gtk_tree_view_get_background_area(). Tested on GTK3.22 with the sample project provided in the bug report, and the snippet attached to this patch. Testing in a child Eclipse shows no ill effects in the call hierarchy, open type dialog, package explorer, etc. No AllNonBrowser JUnit tests fail. Change-Id: I57933468313376f6d3735644fc9a5eb19fee3c99 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-06-18Bug 379271 - Combo#getCaretLocation() is slightly too far down/rightXi Yan1-0/+88
Subtracted thickness from offset when calculating caret location for Combo. Works on GTK3. Change-Id: I0b781d3065f6ff65dae6d0ed1c894d0526a22f4f Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-06-18Bug 127132 - [GTK] TableColumn#pack does not work for virtual tableXi Yan1-22/+17
Added padding for calculating TableColumn width. Modified pack method for TableColumn to calculate size based on what is displayed for virtual tables. All tests in AllNonBrowserTests passed. Change-Id: I45a3e7b993e83cff6afe4abfe4a11c91a93128e9 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-06-15Bug 209975 - On GTK PopupList throws an exception while open if theXi Yan1-0/+61
parent window closes. PopupList also fails to gain focus on open. Allow PopupList to take focus when it is opened in the FocusListener of a different widget. Change-Id: I44b297e091527b8439e867be5150e1572900421d Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-06-14Bug 535392 [Webkit2] Browser.getText() returns wrong decoding whenLeo Ufimtsev3-1/+286
setText() contains utf (code point >127) characters Problem: - Webkit sometimes returns ASCII encoding and sometimes UTF-16LE - ASCII is returned when all characters are ascii, UFT-16LE is returned if at least one character is non-ascii. - At the binary level, it is not possible to tell encodings apart - webkit2 currently (v2.20) doesn't have api to get encoding of data. - Byte order mark is not provided with return value. Solution: - I wrote a in-house-made SWT heuristic to try and figure out encoding. This works well for strings that are 2+ characters and OK for most single characters. - Hopefully this is a temporary solution until Webkit2gtk developers give us access to encoding api. (I will request in 535392). Testing: - Added testing suite for converter. - Tested via snippet. - Tested via given SWT bot project that sets/gets text of 'find' man page. - All SWT jUnit tests work fine. - Child eclipse seems to work fine. Considerations & potential issues with this patch: - This patch contains a lot of double/triple byte UTF characters, if some of our build tools have issues with special UTF characters, then they may have issues. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=535392 Change-Id: I9be1f679676dfacf6415d0ae702cea41aa30cf7b Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-06-12Bug 535323: [GTK3] Combo sizing problemsEric Williams2-0/+125
This is a two part fix: 1) Override resizeCalculationsGTK3 in Combo to use the GtkEntry for non-READ_ONLY Combos. This prevents us from using the GtkComboBoxText's preferred size which is usually way too large on GTK3.20+. 2) Update the patch from bug 500703 to support the case where one Composite has multiple Combo widgets inside of it. We support this case by setting fixClipHandle in the parent Composite, and then using a HashMap to keep track of the individual Controls, and their respective children who need to have their clips adjusted. Tested on GTK3.22 on X11 and Wayland -- no ill effects. No AllNonBrowser JUnit tests fail. Change-Id: I1d262c9d321dc314c7f66966bd58fbd8e25ba77e Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-06-12Bug 305864 - [GTK] getItemHeight method of org.eclipse.swt.widgets.ListXi Yan1-0/+137
returns a wrong Item height Added padding of cell when calculating item height in getItemHeight method of List, Table, and Tree for GTK3. Change-Id: I59c7163f46e2df3a31958ba9235038de7e58280f Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-06-07Bug 396175 - Link widget needs an escape character for < and >Xi Yan1-0/+42
Added escape character for angle bracket in link widget. Change-Id: I44675a5a18c4319421c9b37af16d4d345ec8b55d Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-06-01Fixes Method invokes inefficient Number constructor inLars Vogel1-1/+1
Bug144120_GLCanvasMouseEvents Change-Id: I8548076b97b97dc6bd73f518876e201294e22431 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2018-05-31Bug 489640 [GTK3] setting a lot of items to combobox is extremely slowI20180531-2000Leo Ufimtsev1-1/+0
(on gtk_combo_box_text_insert) Fix warning in test. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=4896403 Change-Id: I59d06552c3fb3d4ce479fd411cdcf403432ce530 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-05-29Bug 489640 [GTK3] setting a lot of items to combobox is extremely slowLeo Ufimtsev1-28/+68
(Bug fix). Setting wrap causes O(n^2) performance regression because after every insert the drop-down list size is re-computed. Solution: 1) Turn off wrap during insert (to fix bulk insert, e.g setItems(...)) 2) Delay enabling (so that multiple single-insert calls [e.g add(.)] are not delayed if called in a loop. Tests: - Attached snippets: Before fix: Gtk3: 1000ms After fix: Gtk3: 10ms (event faster than gtk2's 23ms). - Child eclipse works well. - All SWT jUnits pass. - Combo box looks same as before. Patchset 4: - Implemented similar logic for removing items to fix performance. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=4896403 Change-Id: Ibf14b35712277e068bc719d073a482ab5c04fb7f Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-05-29Bug 258196: [GTK] Virtual Tree does not resize correctly horizontallyEric Williams4-2/+116
Using the patch from bugzilla, add updated flags to Tree and TreeItem which are triggered when changes are made that would affect the layout of the Tree. These changes will trigger the proper scrolling width to be set. Tested on GTK2 and GTK3, no ill effects seen. No AllNonBrowser JUnit tests fail, and the snippet from bug 490203 doesn't show any reduction in performance either. Bumped versions for first 4.9 commit. Change-Id: If8d435248db5bc4ba5448f803bafd4eef1165167 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-05-29Bug 535191 - POM version change for 4.9 releaseAlexander Kurtakov1-1/+1
Change-Id: Icf2788319e154102ecb1002b3e9783824e709266 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-05-03Bug 515773 – [wayland] Text widget not able to grab focus withLeo Ufimtsev1-0/+113
SWT.ON_TOP shell (fixing crash of earlier patch). At the time of the original patch, gdkSeat grab only worked on hidden gdkWindows which were shown with handler, so Ian made gtkWindows invisible before grabbing focus. Having invisible windows leads them to be unrealized and an unrealized window is passed to wayland, which crashes due to a a segfault. In newer gtk3 (3.22) this is no longer the case, seat grabbing works on visible windows, so not hiding windows fixes the gnome crash and doesn't break things. Also I'm making the callback static instead of instance, because otherwise there is a memory leak every time you raise the shell. Tests: - Child eclipse works well, including javadoc and outline. No crashes. - Original bug snippet works well. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=515773 Change-Id: Ief9e066bbd488413ffbbe752f2b2c9ce561f532f Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-05-02Bug 534204 - [GTK3] cramped vertical scale has no troughSimeon Andreev1-14/+21
The orignal fix for bug 534204 (change 121927) addressed only horizontal scales. I.e. despite the fix, if a vertical scale has little rendering space due to resizing or small width hint, it will not draw its trough. This change aims to fix also vertical scales. Change-Id: Ifc6a01ba185b854b832cf9d8c5014d0b035615db Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2018-04-30Bug 500703: [GTK3.20+] Combo with SWT.READ_ONLY is garbled upon re-sizeEric Williams1-0/+7
In GTK3.20+ two things inside GTK3 changed. First, certain widgets have their clips unioned with the clips of their parent widget. This can cause overdrawing in widgets like Combo. Second, the internal widget hierarchy of Combo changed, and most of the resizing is done by a GtkBox instead of GtkComboBox itself. These two changes combined caused this bug. The overdrawing causes the Combo to draw over its neighbouring widgets (like a label). The resize issue means that resizing the widget doesn't cause it get smaller: the x coordinates of the allocation and clip just become negative and the whole widget shifts to the left. The fix is to adjust the clip and allocation of the Combo and its children from the parent Composite's draw handler. This ensures that the Combo is drawn with correct coordinates and that it actually shrinks when resized, instead of just shifting. Tested on GTK3.22, X11 and Wayland. Window -> Preferences -> General -> Keys behaves as expected, and no AllNonBrowser JUnit tests fail. Change-Id: Ic603acfda924b0ca36b4f0ba07048f6762c99270 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-04-30Bug 534174 - Test snippet fails to build on 32bit platformsAlexander Kurtakov1-2/+2
Change-Id: I87380a096dd5548e002d0e2620570d52482dfcf7 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-04-30Bug 534204 - [GTK3] Scale with GridLayout height hint has no lineSimeon Andreev1-0/+63
An SWT Scale for which a low height hint is specified via GridData does not show its line on GTK 3.22. It only shows its trough. This is also observed when the parent of the Scale has a GridLayout and has a small enough size (e.g. due to resizing). This change ensures the scale is never reduced to below 26px. Resizing of the scale is not impacted, since the GTK scale resides in an SWT fixed which can still be resized at will. When resized below 26px, parts of the scale start to become not visible. Change-Id: I5d0b18783b5f126ca2fee6918b885480cbcb977e Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2018-04-20Bug 533799 - shrinking trees/tables can cause errors on standard errorSimeon Andreev1-0/+62
Resizing a GTK tree view so that the column header and the horizontal scrollbar overlap causes pixman bug error messages on standard error. Using standard GTK3 API, it doesn't seem possible to resize the table the tree view in such a way. SWT on the other hand allows this. This change ensures that the SWT fixed which contains the tree or table is resized as requested by resize operation, while the tree or table retains some minimum height to avoid the error. In result, parts of the horizontal scrollbar are no longer visible, when the tree or table is shrinked below about 40px, the column headers and the horizontal scrollbar are visible. Change-Id: I3b39596a0f4eba3e1bbb259ab30d9d8744bb62c1 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2018-04-19Bug 525946 [Webkit2] Port download functionality (rewrite some logic)Leo Ufimtsev1-15/+16
G_TYPE_CHECK_INSTANCE_TYPE is not a reliable method to check if type is webview or webcontext at run time. On my & Roland's system it works, but on Andrey's system it miss-fires. This is a macro and by the looks is not reliable method because we use it with dynamically loaded libraries and via JNI. Solution: Rewrite the callback logic to determine types of callback based on user_data instead of relying on type checking macro. Also, created task to remove usage of the macro to prevent simmila issues: https://bugs.eclipse.org/bugs/show_bug.cgi?id=533833 Tests: - Environment: Webkit2 2.18, Gtk3.22, Fedora 27, wayland on host, x11 eclipse backend. - JUnit AllBrowserTests - ChildEclipse. - Bug Snippet attached to this patch. - Also tested with webkit1. - Andrey reports that this patch fixes his crash issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=533545#c34 Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5259462 Change-Id: I485a54804285dbf114961422799ea34796413404 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-04-16Bug 529431: [GTK3.10+] Snippet294 fails to draw RegionEric Williams1-2/+5
Fix input handling for GTK3.10+ setRegion behaviour. This does a manual check to see if the incoming event coordinates are within the set region: if they are, ignore them. This prevents events like SWT.Selection, SWT.Mouse[Up/Down], etc. from triggering when they are spawned from within the set region. There are two main limitations though: 1) we cannot stop native GTK events as we are doing the region drawing on the SWT level. This means things like mouse enter/leave, button pre-light, etc. will still be visible. We block the selection/click events at the SWT level, but unfortunately there is no reliable way to block these on the GTK level. 2) we also can't block all selection events, as some widgets are selectable using the keyboard (which has no coordinates). This means we could potentially block out selection events that *should* be sent. Tested on GTK3.22, no AllNonBrowser JUnit test failures. Change-Id: Ifd8377feb7d71a366edcdf6083d2bc94ab779886 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-04-11Bug 529431: [GTK3.10+] Snippet294 fails to draw RegionEric Williams1-0/+103
This patch fixes drawing issues when setRegion is called on widgets that are children of Scrollable (like List, for example). The fix is to check if there are incoming draw events for paintHandle() in Control. If this is the case, and setRegion has been defined, we call gtk_draw(). This ensures that the clipping is applied to the right handle and that the region is drawn. Tested on GTK3.22. Compared behaviour with GTK3.8: most widgets work with the exception of Table/Tree and a few others. No AllNonBrowser JUnit tests fail. Functionality for Shell.setRegion() remains functional. Change-Id: Ife9a1688e58eef3c98cc6f74ff7d1bac1eac9986 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-04-10Bug 533145: [GTK] Contribute remaining manual snippets to GTK only repoEric Williams183-0/+13371
Add remaining reproducer snippets to the offical platform specific tests repo. Change-Id: Id8e63ce2650e3ad842d7fe1e7bbeb202a47e23e8 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-04-06Bug 531667 - GTK drawing and clipping issues after Control.print(GC) fixSimeon Andreev5-0/+571
With the fix for bug 531667, at least the following regressions were introduced: 1. and 2. CTabFolder with SWT.RIGHT_TO_LEFT flag is not drawn and code using GC.setTransform()/GC.getTransform() was broken in some cases. E.g. caused drawing artifacts in tools based on GEF, such as figures drawn with wrong coordinates and starting with 0,0 in a global window space. We observe these regressions, since the Cairo transformation matrix is overwritten on some occasions, causing Cairo to lose the current (x,y) translation relative to the widget parents. 3. Further drawing artifacts are seen when scrolling in a GEF editor, or when resizing neighboring part stacks so that they land over specific GEF editor elements (e.g. LED). Namely, some elements are painted over neighboring composites (e.g. ports of a LED). This is caused by bad clipping set by client code and GC.setClipping(0) removing current Cairo clipping. Since GC is able to to draw at any point in the shell after the fix for bug 531667 (as the Cairo handle is shared by all composites), this results in client code being able to draw over other unrelated composites. 4. Bug 478618 was re-introduced on GTK > 3.20, i.e. ControlDecoration of e.g. text fields would paint its error decoration at a wrong location. In result, two decorations per ControlDecoration are painted; one of which is misplaced while the other will not be repainted on correcting input. On GTK 3.14 the ControlDecorations aren't drawn at all independently from bug 531667 or this patch, see bug 533241. We resolve the first two issues by remembering the original Cairo transformation matrix in GC and applying this matrix on every transform set by the client code. The third regression is fixed by remembering the original Cairo clipping and intersecting the client clipping with it. The last regression in ControlDecoration is fixed by applying the patch for bug 478618 also for GTK 3.20 and above. For GTK 3.14 see bug 533241, because this is not a regression from the Control.print(GC) fix. Manual bug snippets are provided for all of the regressions. Change-Id: I1bcc3c72d14fc37b05c51ff6f0845667a95d160c Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com> Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2018-04-03Bug 529431: [GTK3.10+] Snippet294 fails to draw RegionEric Williams1-0/+67
Allow GtkWindow (usually Shells) to be shaped using gdk_window_shape_combine_region() instead of cairo_clip. GtkWindow is unaffected by the changes in GTK3.10 so this is fine. A snippet has been added to test this functionality, and to test for the case mentioned in comment 8 of bug 529431. Change-Id: I40c80599e015553576fc8979181577c1170146d2 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-03-28Bug 531928: [GTK3] Table editing is brokenEric Williams1-0/+98
The fix for bug 511133 introduced some logic which raises/lowers the GdkWindows of widgets who are children of Table or Tree. Unforunately, this breaks certain cases such as Tables/Trees that have more than one child widget. Additionally, changing the drawing handle from fixedHandle to handle meant that some child widgets were not getting their draw events properly. According to GTK, child widgets with non-native windows should receive draw events from their parent containers using gtk_container_propagate_draw(). This patch follows this advice and connects a Table/Tree's fixedHandle to the draw signal. The incoming draw events to that fixedHandle are then propagated to the respective child widgets using gtk_container_propagate_draw(). A reproducer snippet is attached. This patch also fixes a regression from bug 511133 which caused the file permissions table (right click file -> properties -> resources) to be empty/contain only one checkbox. Change-Id: I645a04df6773372aa27a360d3df9a3521437828f Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-03-19Bug 532139 – Add Copyright to a java few files.Leo Ufimtsev6-0/+86
Adding missing copyright notices and removing old Command line interface that is no longer being used as such testing can be accomplished via launch groups. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=532139 Change-Id: I9cc3e9a48e70adbd49c993e39100be1301ea5551 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-03-16Bug 531048 [GTK3] Problems drawing ownerdraw tables (Tests)Leo Ufimtsev4-219/+741
Adding/updating some tests I used for the fix. Useful for quickly running through a large set of snippets and visually insect that nothing broke. I often found the Waterbed effect, a small change in one place would break thing far far away... Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5310483 Change-Id: I284e01fb077361cc1a21ffff3c77528c9e25b491 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-03-05Bug 531667 - [GTK3] Cannot draw Canvas with Control.print(GC)Simeon Andreev2-0/+301
Calling Canvas.pring(GC) results in no painted canvas on the GC. This is caused by a regression from the fix for Bug 421127. Control.print propagates the GC.handle as the last argument to Control.gtk_draw. With changes for Bug 421127 in Control.gtk_draw, the handle is no longer propagated to the actual onPaint event. The canvas (and canvas derived widgets) therefore no longer paint themselves on the GC. The problem which was fixed with the change in Control.gtk_draw, for Bug 421127, was that CTabFolder tabs were not painted. This is the case, since GC.getClipping returned broken values with GTK 3.10 and above. CTabFolder checks for intersection with the clipping region and doesn't paint itself. The clipping region was not computed properly, due to transformations done with the device space transformation matrix provided by Cairo. From GTK 3.10 onward, this matrix contains absolute coordinates of the widget, with respect to the shell. This causes the method to malfunction. With the fix for Bug 421127, the Cairo matrix is no longer propagated. As a result GC.getClipping only works with the identity matrix, resulting in correct clipping. This change reverts the change for Bug 421127 in Control.gtk_draw, for GTK versions 3.14 and above. The GC.getClipping method is adapted to first transform the local GC bounds to device space, before computing the intersection with the clipping region. This is done for GTK 3.14 and above. We validated the change with GTK 3.14 and GTK 3.22. A bug snippet is provided, show-casing clipping region and Cairo device space transformation matrix. Change-Id: Ib1d6bb866bcffa010a9e8f2a5e4296eba4e1d852 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2018-03-02Bug 531048 [GTK3] Large problems drawing ownerdraw tables (tests).Leo Ufimtsev4-0/+1501
Adding manual JUnit tests to verify changes to table don't break table. Tests are aimed at verifying visual glitches (like cheese). Going through these is quite quick (F1=pass, F2=Fail, F3=Skip, ESC=Quit). A lot of the tests originate from snippets. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5310483 Change-Id: I3ad13abd45110e528987b04f1061435d38127fa7 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-02-15Bug 510803 [GTK3] Regression in table editing capabilities in tabfolder.I20180215-2000Leo Ufimtsev2-108/+124
Breakage occurred because tabItem reparented an item that had a non-standard gDk parent window. Solution: fix gdk window parent for such special controls. (I.e ControlEditors in tables). Verification: - Open child eclipse, change method signature. Now table cells can be edited via click. - Open attached snippet, with patch cells can be edited properly. - AllTests Gtk3.22 - X11/Wayland. Patchset 3: - Minor rename of methods to clarify that it's a *gdk* window, Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5108033 Change-Id: I8dcaac950eb0847dd97016b2140c607012550d2f Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-02-12Bug 530969: [GTK3] Control.print() doesn't seem to workEric Williams1-0/+113
In GTK3, gtk_widget_draw() relies on the priv->alloc_needed flag to be set to TRUE. This is an internal flag in a private struct so we cannot access it. The fix is to the get the topHandle's allocation, and simply re-set it. This triggers an allocation change without actually changing the size of the widget. Tested on GTK3.8+. No JUnit test failures. Change-Id: I81df53bfceaa988a2cce574ef7629c64c0ec6fb9 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-02-02Bug 481485: [GTK3.10+] Paint listener for button/label does not workEric Williams1-0/+45
On GTK3.10+, Buttons and Labels do not receive the proper draw signals. This is due to them drawing on their SwtFixed parents (fixedHandle), as GtkButton and GtkLabel do not have their own GdkWindows. This patch reverts parts of bug 483791 and fixes this bug by overriding windowProc() in Button and Label. There we check if the incoming handle is the paintHandle, and draw accordingly. Bug snippet is attached in this patch. Change-Id: I7c415985248ca5fda9e38aaf9b0c08ae834d762d Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-02-02Bug 530567 – Move BugSnippets into separate package and exclude fromLeo Ufimtsev48-2/+152
builds. (rename) Renaming bug snippets to 'ManualTests' to better express functionality. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=530567 Change-Id: If0132056efaf7a952dbe9f9248180cb56c8f6c9d Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-02-01Bug 530609 – Add missing license headers to bug snippetsLeo Ufimtsev42-35/+613
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=530609 Change-Id: Idacfef6e77f9b9a4a3ecb75c8ad6b1746a86f50e Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-02-01Bug 529151 [Gtk] Move gtk function from OS.java to GTK.javaLeo Ufimtsev1-131/+132
Benefits: - Adding dynamic functions doesn't require one to manually link the function in os_custom.h anymore. This makes prototyping much faster and SWT development more user friendly. - NativeStats tool generates a separate category for gtk functions (from OS.java once). Technical details: - SWT Tools generates <CLASS_NAME>_LOAD_FUNCTION with GTK.java, we get GTK_LOAD_FUNCTION - we hard-code GTK_LOAD_FUNCTION to link to gtk lib (see os.h). - All native code is still put into os.(c|h) - I manually Updated a few special OS_LOAD_FUNCTION calls and removed old bindings in os_custom.h Verified with child eclipse. Fedora 27, Gtk3.22. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=529151 Change-Id: I6446ee5cca090022a8d984a1f92969c26e5e2f24 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-01-30Bug 529870 – [webkit2]BrowserProblemI20180130-2000Leo Ufimtsev1-0/+51
Fixing a corner case that can generate a deadlock. - A) User calls evaluate(SCRIPT) - B) The SCRIPT calls a BrowserFunction, (java/swt) - C) The BrowserFunction calls evaluate() Now webkit_web_view_run_javascript() in C never starts because webkit is still executing A. But A never finishes because it's waiting for C to complete to get a return value for A's callback. Solution: Don't allow blocking evaluation in BrowserFunction() callbacks. This shouldn't affect folks mostly, because from what I gather people use 'evaluate' as a form of execute(). This has gone unnoticed on Win32/Cocoa because issue isn't explicitly raised and 'evaluate()' return value wasn't used. Verified with AllBrowser JUnits. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5298702 Change-Id: Iddc8c753051455f6706ea81db85e0c6610be11a9 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-01-26Bug 530397 – [Gtk] Make gdbus initialization dynamicLeo Ufimtsev1-4/+7
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=530397 Change-Id: Ia99129ce35b8e190402abea3a2eb75d668e8c825 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-01-22Bug 525305 – [API]Provide SWT.OpenUrl event (Linux implementation)Leo Ufimtsev1-0/+47
(For review/merge) Linux implementation for OpenUrl event, with use of GDBus. (As per original patch *1). URL vs file detection done via "new URI(file).getScheme()". I tested, this distinguishes URI's from files quite well. I.e: /myfile/ ./file file .. -> (OpenFile) http://www.eclipse.org mailto:my@mail.com .. -> (OpenUrl) I've tested with latest launcher: 1) Via launcher: eclipse http://www.eclipse.org /tmp/myFile 2) Via gdbus calls: gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt.FileOpen "['http://www.google.com', '/tmp/myFile']" Patchset 2: - Updated URL detection logic so that files/urls are properly distinguished. Links: [1] Original patch: https://git.eclipse.org/r/#/c/30107/14/bundles/org.eclipse.swt/Eclipse+SWT/gtk/org/eclipse/swt/widgets/Display.java Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=525305 Change-Id: I6531989e3eb766fdf0715a0a9cb86c9ed2b973f3 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-01-17Bug 528284: [GTK3] Toolbar: TCF dropdown control is cutoffEric Williams1-0/+79
Still testing, DO NOT MERGE. PART 1/2: SWT fix (other fix is for TCF UI code) Use gtk_button_set_image() instead of gtk_container_add() to prevent smaller buttons from having trimmed arrow icons when SWT.ARROW is specified. This change in logic is due to GTK3 using an actual GtkImage for icons, where GTK2 uses GtkArrow which is its own widget. Tested with ControlExample and the TCF Target Explorer ToolBar contribution. No AllNonBrowser JUnit tests fail. Change-Id: I3c4c33acb689ac36c4567cc8d7bbb5b3ff4e4c19 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-01-09Bug 519295: [GTK3] Invisible settings button in validation preferencesEric Williams1-0/+74
Bug snippet to reproduce the issue. Change-Id: Ida0ebe281bc2fa7e6b73d6a63ff78f38b34412a8 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-01-04Bug 528155: [GTK] Table/Tree forgets to set SWT.SELECTED bit onEric Williams1-0/+112
PaintItem Bug snippet to reproduce the issue. Change-Id: I7047c7cae0fc126b6c7be3db7814b836b9234b43 Signed-off-by: Eric Williams <ericwill@redhat.com>
2017-12-22Bug 529126: [Wayland][GTK3] Tree does not notify SWT.MouseDown listenersEric Williams1-0/+134
Added bug snippet to reproduce the issue. Change-Id: Ib4bfdab5fb2230ea7a33898af7db069704548216 Signed-off-by: Eric Williams <ericwill@redhat.com>
2017-12-19Bug 528691: [GTK] StyledText ignores text after \u0000 characterEric Williams1-0/+38
Bug snippet to reproduce the issue. Change-Id: Iac21d9c89fcc9d25a5e0d3cd1f004dba0e40736c Signed-off-by: Eric Williams <ericwill@redhat.com>
2017-12-18Bug 483791: [GTK3] setBackground overrides GC drawing in PaintListenerEric Williams1-2/+2
Fix typo in bug snippet. Change-Id: I55a9fe0c4e933b6fe8bbfee45b0e9fcb51aa7ba7 Signed-off-by: Eric Williams <ericwill@redhat.com>

Back to the top