Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2019-03-15Bug 545139 - Creating TableColumn after TableItem leeds to erase ofXi Yan1-0/+81
TableItem "strings" field Fix inconsistency in GTK where creating the first TableColumn after TableItems overwrites the cached text of TableItem. Change-Id: I65d1f760a9b05dadcc446ff1006d5122273f20c6 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2019-03-15Bug 545403: [GTK3] MouseWheel event only reports GDK.GDK_SCROLL_UPEric Williams1-0/+39
gdk_event_get_scroll_direction() will return false if GDK_SMOOTH is enabled. The fix is to check if this function returns false, and then call gdk_event_get_scroll_deltas() to get the scroll delta. Change-Id: I27bb15b61d9da4c5e749e71d6bb27bbcfc63b879 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-03-14Bug 545406: [GTK3] Text: order of setBackground/setForeground mattersEric Williams2-0/+64
GTK-CSS parsing doesn't handle selection foreground colors well, instead use manual foreground GdkRGBA tracking just like for background colors. Change-Id: Ib9a02df6c6845b35f95d2e57093e9b371e134846 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-03-12Bug 489751 - [GTK3] disposing an item will select a nodeXi Yan1-0/+69
Fix regression in ant.test.ui. Tested with AntUITests. Added regression test that disposing tree items will not trigger SWT.Selection event. Change-Id: Ia10cb57f8087e6690bba073f78aa3a73d26914fa
2019-03-11Bug 489751 - [GTK3] disposing an item will select a nodeXi Yan2-0/+170
Disposing selected item in Tree/Table makes the next node selected again. Avoid this by setting the selection to another item and deselecting before disposing TableItem/TreeItem. Change-Id: I0b8494a3f03d32d1926210c2293001306872e504 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2019-03-11Bug 531048: [GTK3] Large problems drawing ownerdraw tablesEric Williams1-0/+131
Invalidate the GtkStyleContext when sending out SWT.SetData events, as a commit in GTK3.18 changed the way this happens internally in GTK: https://gitlab.gnome.org/GNOME/gtk/commit/399df06d1931add5d5b0422f6f99fe4ff1a1faa7 Tested using the snippet attached. The IDE Tables/Trees seem to draw without issue, no AllNonBrowser JUnit tests fail. Change-Id: I43570b21f7d8c0f8880409d87198e178dd9e660c Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-03-11Bug 225878 - New JUnit tests for CComboAlexander Kurtakov1-1/+812
Resurrect the patch from bugzilla Change-Id: I7cc2cb46bf55d9f697fc795af4a0b70785e30119 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-03-11Bug 72316 - [JUnit] Shell constructor test should verify resultAlexander Kurtakov3-3/+5
Actually check that the style is applied. Change-Id: Icebb697de9401ad2a5d1146a4a5f04bf8980836a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-03-08Bug 545094 - POM and product version change for 4.12 releaseNiraj Modi5-5/+5
Change-Id: Iefa1a6b83bab0f3875b20bfc8975e4274d166b05 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
2019-02-26Revert "Revert "Bug 541415 - setLineVerticalIndent makes getTopPixel fail""Mickael Istria1-0/+13
Make setLineVerticalIndent reset the outdated verticalOffsetPixel when the indent affects the scroll location, so vertifactOffset gets recomputed later when necessary. This reverts commit 33ab81d8513fb320fbe759c8b766299f584d5c3f. Change-Id: I62a23f7f538090477ab162e3df3889c0af5060e1
2019-02-26Revert "Bug 541415 - setLineVerticalIndent makes getTopPixel fail"Dani Megert1-13/+0
This reverts commit 01afcdc0fb8782ec7a80728fedb1495e0212ed01. Change-Id: I89fdd297297fdfa70e134254777152ea2e2e8f69
2019-02-26Bug 541415 - setLineVerticalIndent makes getTopPixel failMickael Istria1-0/+13
Make setLineVerticalIndent reset the outdated verticalOffsetPixel when the indent affects the scroll location, so vertifactOffset gets recomputed later when necessary. Change-Id: Ie358297ec817a216bc4e3e09b8949f3b056598d4 Signed-off-by: Mickael Istria <mistria@redhat.com>
2019-02-26Bug 544282 - [GTK3] org.eclipse.swt.widgets.Table.remove(int, int) isXi Yan1-0/+116
extremely slow gtk_list_store_remove sets iter to be the next valid row. Avoid calling gtk_tree_model_iter_nth_child in loop. In remove(int, int), call removeAll rather than removing each item in a loop when possible. Change-Id: I67a494a5dbb15d32560c1a548213937a75611565 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2019-02-20Bug 436085: setTabs method in Text widget is ignored when style includesEric Williams2-1/+37
SWT.SINGLE Enable setTabs() to work with Text widgets of style SWT.SINGLE. Previously this was not implemented, and SWT was just retuning for all SWT.SINGLE Text widgets. Additionally, the automated JUnit tests for such functionality were limited to Win32 only -- I have now enabled them to run on Linux as well. A reproducer snippet is also attached to this commit. Change-Id: I259a4226475296ff2514c016590668e4d90be1c2 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-02-13Bug 543949: Orca's flat review mode can not be usedEric Williams1-0/+38
Not all SwtFixedAccessible instances have corresponding AccessibleObjects, meaning the implementation of ATK API is SwtFixedAccessible's responsibility to handle natively. Most ATK API like AtkEditableText or AtkAction doesn't need to worry about this since those API's are specialized for certain functions. However AtkComponent covers geometry which is pretty important information for a container accessibility implementation. The fix: if no AccessibleObject exists, calculate the extents/size/position manually. We can do this even with scaling by using JNI to call Java level methods like toDisplay. Change-Id: Ib54821fc006eedc039dc9dc4b3dc83ddc5cc58ab Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-02-08Bug 544282 - [GTK3] apply the optimization for Tree.setItemCount(0) tooAndrey Loskutov2-1/+56
Also added some more tests. Change-Id: Ic14ff6e0f7f694c8a1756e34a7b17986301213d4 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2019-02-04Bug 543984 - [GTK4] Adapt to GdkEventType constants changesXi Yan1-0/+82
- Add new GdkEventType constant values - Add pre-processing function to fix different GdkEventType values on GTK4 - Adapt all GdkEventType to use correct constant on GTK3 and GTK4 - Guard connecting to event signal in Shell to avoid duplicate mouse press/release events. Tested on GTK3 with ControlExample Listeners. Tested with attached snippet on GTK4. Change-Id: I43f139a0b8d8b41820c64189767377ebb6fc9db5 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2019-01-31Revert "Bug 543984 - [GTK4] Adapt to GdkEventType constants changes"Xi Yan1-66/+0
This reverts commit 2f5a98b4cbd50b436a5ffad0a1d5949f3b9a1b18. Change-Id: I60ebccca14cfdc5619bb763424f1289a44e3ed89
2019-01-31Bug 543984 - [GTK4] Adapt to GdkEventType constants changesXi Yan1-0/+66
Add new GdkEventType constant values, adapt GDK.EXPOSE, GDK.BUTTON_PRESS, GDK.BUTTON_RELEASE on GTK4. Guard connecting to event signal in Shell to avoid duplicate mouse press/release events. Tested on GTK3 with ControlExample MouseListener. Tested with attached snippet on GTK4. Change-Id: Ida2f3a4d77efcb98d99a1aa4bcbb418c8cbfc718
2019-01-21Disable failing test on WaylandEric Williams1-22/+25
Change-Id: I7d0340a5694f7a72bb89a4a19f3411d8eda952b9 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-01-17Bug 542940 - Method setEditor of class TreeEditor raises javaXi Yan1-0/+87
nullException Calling gtk_widget_show and then gtk_widget_hide in Control#setBounds from TreeEditor.setEditor causes display to be null. The workaround is to force Text to be visible on initialization so that we do not need to force show/hide in order to set bound for the TreeEditor text. See similar fix for Button in Bug 533469. Tested with attached snippet, Bug533469_GhostButton, Bug497705_setBoundsAfterSetVisible. Change-Id: I9fe8cfb63358608700246d9a6c9355b53169045d Signed-off-by: Xi Yan <xixiyan@redhat.com>
2019-01-11Bug 533728 - [GTK] Custom cursor without transparency not shownXi Yan1-0/+56
If ImageData does not have alpha, set alpha to -1 for opaque image. Change-Id: Ib025790fbd6141895b43dd9c6170f5e9594b8c11 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-12-20Bug 542865: [GTK4] Snippets with any children of Shell crash uponEric Williams1-0/+43
gtk_widget_get_surface_allocation() GTK4 no longer supports "own" surfaces for widgets, so this patch removes this logic from the GTK4 SwtFixed implementation. Some adjustments have to made in Control, as we do gtk_widget_get_has_surface_or_window() checks to determine the paintHandle. In GTK4 this is broken so always use the surface of the fixedHandle (or clientHandle in the case of Group). Change-Id: I09c0c096407ab67ac10edfcd21a3c9927cb5f833 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-12-14Bug 535978: [GTK3] Bad Scrolling behaviour of tables with CheckboxEric Williams1-0/+75
The issue at hand in this bug is that Tree/Table editing widgets are children of the fixedHandle, which sits above the GtkTreeView in the widget hierarchy. This means that they are siblings of the tree/table, and thus will continue to draw even on top of the tree/table headers. The fix is to calculate the location and size of the header bars and keep track of them in Composite. When editing widgets are drawn using Composite.propagateDraw(), we check to see if the widgets would be about to be drawn over a tree/table header. If they are, we raise/lower the GdkWindow belonging to the editing widgets, depending on whether or not it needs to be drawn or not. Tested on GTK3.24 using the snippet attached to this ticket and also the snippet from bug 531928. No AllNonBrowser JUnit tests fail, and the update sites editor in a child Eclipse seems to be working as intended. Change-Id: I66d90c438a3d44afdd6bf6112deef5af680cd201 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-12-12Run tests with surefire 2.20.1.Alexander Kurtakov1-1/+1
Change-Id: I90ea31ce5e396ecc7c7ebae79f781b3811054f06 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-12-11Bug 542475 - [GTK3] DateTime date decreases when focusing outXi Yan1-0/+46
Same issue as bug 538648 with the SWT.MEDIUM style on US locale. Modified previous patch to account for all cases where Month as string is the first field in DateTime spinner. When using SWT.SHORT | SWT.DATE on US locale, increment arrow increases date by 2 and decrement arrow doesn't work. This is because new_value from calendar have month between 0-11 while the adj_value have month betwene 1-12. Fix is to shift adj_value by 1 offset so that we get the correct arrow direction. This doesn't happen if DATE is the first value (i.e. using Canada locale) Change-Id: I52c5ef02e936a89d66566032aff437d165ceb289 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-12-11Bump versions for 4.11 stream.Alexander Kurtakov2-3/+3
Change-Id: I36ed391a09e9e09fe55aaa7acd1df6d701a2397f Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-12-07Bug 541822 - POM and product version change for 4.11 releaseAlexander Kurtakov5-5/+5
Change-Id: I8454243e87078b718102ce58702c08fe8f9f163c Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-11-30Bug 541720 - [Gtk3] Regression: TableColumn.pack() clears header in 4.9Xi Yan1-0/+83
Previous patch (https://git.eclipse.org/r/#/c/126904/ )fixes table appearing as thin line by always showing the table before getting the preferred size, and hiding it afterwards. This caused a regression that when the second time pack() is called, it always hides the header. This patch fixes this by only hiding the header when it is not suppose to be visible. Change-Id: I7cbe06cb36a7ae7b18a52010361f5c575d88ff0b Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-11-23Bug 541107: [GTK4] Port native SwtFixed code to GTK4Eric Williams8-0/+568
Contribute SwtFixed native test snippet for GTK4. Change-Id: If3bc3d4f8a863521e4c313ad7cb4946e821d0326 Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-11-20Some more version updatesLakshmi Priya Shanmugam1-1/+1
Updated version in build.xml and in tests plugin Change-Id: I72ba210d8095f6db3b337a290e9266a9ee013d5e
2018-11-16Bug 540809 - [GTK4] Replace gdk_test_* functionsXi Yan1-0/+233
- Replaced gdk_test_* functions to simulate mouse/key events with manually constructed gdkEvents in Display.post(). - Get the currently focused gdkWindow for keyboard events with gdk_get_default_root_window and gdk_window_get_children instead of using GdkScreen. - Rewrote logic for accumulating keyboard state and keyval. Rewrote caching mechanism for modifier states. - Fixed several type cast discrepancies with native methods. Moved OS.gdk_keymap_translate_keyboard_state to GDK.java Side effects: - Key events can be posted on Wayland as well due to new method for getting focused gdkWindow - Also partially fixed bug 521506, button pressed signal can be emitted (but not menu items). Maybe also made bug 540441 better. - Known limitation: mouse events cannot be simulated on Wayland because: 1) gdk_device_warp does not have an implementation on wayland, cursor cannot be moved. 2) gdk_device_get_window_at_position returns null on Wayland because pointer device is not known to GDK. Tested with Bug302171_AltGr (x11/Wayland), Bug537025_SendKeyEvent(x11/Wayland), Bug521506_FakeClick(x11 only) Change-Id: I5e294810b44f9f3778d43dc6bc2fda4c86fc305b Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-11-09Bug 536564: Test failures on Mac OS X 10.13 from I20180628-0230Lakshmi Shanmugam1-2/+3
Re-ordering the Shell Tests. Change-Id: I38ab8c85b45dc720c808c084182f528d22851cc0
2018-11-08Bug 533469 - [GTK3] Ghost button since upgrade to GTK 3.22Xi Yan1-12/+17
1) On GTK3.19+, widgets are shown with the default minimum size. As a result, calling gtk_widget_set_visible in Control#setInitialBounds causes 0x0 widgets to be visible but cannot be used. 2) The previous patch that tries to hide all 0x0 widgets in gtk_draw causes NPE with display being disposed (see bug 540298). 3) The right way to go about (1) is to omit showing widgets in setInitialBounds, but this seems to cause the regression that button does not gain focus. (https://git.eclipse.org/r/#/c/131745/ ) This patch attempts to address these issues. It uses (3) for all widgets except Button and Composite, and limits the fix in (2) for Button only. Change-Id: I1283df211395897e582cbc9d4d11255fb363938c Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-11-06Remove reparentablePlatform list from SwtTestUtil.Alexander Kurtakov2-12/+1
All supported platforms are reparentable. Change-Id: Iff339dfcd23fa51c7871026fd4fff1616f5753dc Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-11-06Remove AIX leftovers.Alexander Kurtakov3-19/+12
Hacks for it was just multiplied for work on Bug 540692 so we would better stop that. It has never gained GTK3 support and the fragment is long gone. Change-Id: If9e400c93fc1d05661b200274a90b9ccc35ad31a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-11-05Bug 540789 - Control.setForeground(Color) accepts disposed colorSimeon Andreev1-0/+22
Among other code, the commits for bug 530841 removed checks from Control.setForeground(Color) and Control.setBackground(Color) which validate against a disposed color argument. As a result, passing a disposed color object to those methods causes the widget to use the default foreground resp. background color. This is sub-optimal API behavior. This change re-adds the missing dispose checks. Change-Id: I4e4b76f09560dcd4d87b4eb2d79853a02b484369 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2018-10-12Bug 535075 - [Wayland] application rendered with an offset relatively toXi Yan1-0/+44
host window On Wayland, calling gtk_widget_size_allocate with a relative position to the GtkContainer causes window contents to be rendered outside of the actual GtkWindow. The fix is to map container's coordinate relative to the window's coordinate, and render the position according to the relative coordinate. Tested with child Eclipse Tip of the Day on Wayland (Bug 536153). Change-Id: I93d26be94f57fcb7556f4fe683f41783d5ebcdbc Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-09-28Bug 535083 - [Wayland] setRegion() and transparent shells don't work.Xi Yan1-0/+65
Platform Part-Drag causes eclipse black-out. 1) Replaced gdk_window_shape_combine_region with gtk_widget_shape_combine_region wrapper in Control#setRegion. 2) There is a bug in GTK on Wayland where pixels in window outside shape_region is black instead of transparent when the GtkWidget has opacity of 1.0. This causes the problem where part-drag rectangles introduces a black overlay shell covering Eclipse itself. This patch uses a hack where the opacity of the widget is set to 0.99 whenever we want to set a custom region. 3) Make the GTK_WINDOW_POPUP overlay in Tracker transient to the parent if possible to avoid window not mapped warning on Wayland. Tested on Wayland with Snippet134, Snippet 285, and child Eclipse. Change-Id: I5f2a1bdd3a7acee87b09ab23f8951da0dbbd5c53 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-09-26Bug 539367: [GTK3] Long text in Combo drawn over drop-down button andEric Williams2-0/+110
outside of combo Combos have a GtkCellView, which renders the text, and other icons. by default, GtkCellView has a "fit-model" property which is set to true. This means the content in the cell view will always expand to the maximum size. Setting it to false allows us to resize the cell view as desired. The fix for this bug is to set the clipping of the cell view to a smaller size: we find the x position of the drop down icon, minus its width. This stops the text from being drawn over the drop down icon, and sometimes over other widgets. Tested on GTK3.22 and 3.20, all other versions of GTK3 are unaffected. The snippets in this patch do not show the bug, nor does the one for bug 500703. Additionally, the keys preferences page does not exhibit any issues either. No AllNonBrowser JUnit tests fail. Change-Id: Iabfae03c7ee5b0279b87fa7054bc28c75d2d3b7e Signed-off-by: Eric Williams <ericwill@redhat.com>
2018-09-20Bug 539274 - Test_org_eclipse_swt_widgets_Shell.test_activateEventSend()Ed Merks1-2/+1
doesn't compile on Windows Fix regression test Test_org_eclipse_swt_widgets_Shell.test_activateEventSend() so that it compiles on all platforms Change-Id: Ieb701f04d2fb33fe265b19499eb127531691ac58 Signed-off-by: Ed Merks <ed.merks@gmail.com>
2018-09-19Bug 533395 - [Gtk][Regression] Keyboard shortcuts are taken from firstXi Yan1-0/+43
item in "Input Source" instead of currently active input, thus breaking custom layouts (e.g Dvorak/Colemak/AZERTY) if it's not default layout. Previous patch to bug 61190 forces every keyboard layout to use any Latin layout group (depending on order of Map). For custom layouts that is a Latin layout group (i.e. contains alphabets a-z), there is no need to force an arbitrary Latin layout group for them as it might default to another layout if there are multiple input sources. Take the current active input layout if it is Latin group, otherwise take the default Latin group to prevent shortcuts not working for non-English keyboard. The patch applies to X11 only. On Wayland, GdkEventKey.group always defaults to the primary layout. Tested with attached snippet: Ctrl+i/Ctrl+. should copy/paste in both StyledText and Text in Dvorak. In child Eclipse: Ctrl+i/Ctrl+. copy/paste text in Dvorak, shortcuts should work under Russian keyboard. Change-Id: Iab4ee98060b3062bad1c5952436f2bed27225d07 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-09-19Bump versions for 4.10 stream.Alexander Kurtakov2-2/+2
Change-Id: Ie6cd01ef133af2634204dd34a8e8bf6707281bc2 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-09-18Bug 436841 - [GTK3] FocusOut/In and Activate/Deactivate events whenXi Yan1-0/+24
opening context menu Added regression test to ensure Activate events are send. Change-Id: I7d3aef73e14a86acd6f5edd544979a9c73b47741 Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-09-18Even more GTK2 cleanups.Alexander Kurtakov2-152/+0
* Don't look for SWT_GTK3 * Remove GTK2 specific comments. * remove get_size from GtkCellRendererClass replaced by get_preferred_width Change-Id: If3f7f37a11310533257dc818fd1dd1f5112dbe91 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-09-18Remove Gtk3 check in tests.Alexander Kurtakov5-25/+11
SWT now requires Gtk 3.4+ so this check is of no use. Change-Id: I256c5aba82ebd173d1aa737c7af18c0fd38ceedb Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-09-18Remove unneeded SuppressWarning.Alexander Kurtakov1-1/+0
Change-Id: I9596050d28f33156ea6aea9f11dcce17cd4a2f0a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-09-14Bug 536766 - Drop 32 bit support in 4.10Sravan Kumar Lakkimsetti1-22/+0
Change-Id: I4bd55029efb18daad6efbe8172892b9911a6dc71 Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
2018-09-12Bug 464228 - [Gtk3] Combo box styling differencesXi Yan1-0/+57
Button on non-readonly Combo is not styled, so the background color of the button on combo is dependent on OS theme. GtkEntry and GtkToggleButton in Combo needs to be themed separately using different css providers. Added provider instance for button to load the background CSS to both entry and button instead of the entry only. Tested in child Eclipse in dark theme. On Ubuntu, Combo button is now dark instead of white. On Fedora, Combo button now has same background as entry. Change-Id: I77fbe01361c84309aadc9ab187ebaf80f560850c Signed-off-by: Xi Yan <xixiyan@redhat.com>
2018-09-12Bug 529534 - View content not fully updated after closing CTabFolder tabSimeon Andreev1-0/+108
Whenever an inactive tab is closed in a CTabFolder with a wrapped top right control, the tab area is not fully updated. This can result in an empty grey line, until the tab folder is resized. This change adds a layout request whenever an item of the CTabFolder is closed, ensuring correct layout of the current tab's client area. The change also adds a snippet show-casing the SWT bug. Change-Id: I0763b4e1a7c2e9aac08d030127e00f91e1087571 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>

Back to the top