Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-04-03 06:37:21 +0000
committerAlexander Kurtakov2015-04-03 06:37:21 +0000
commitce15da912006c0de09dc46b1a9f9459d29684102 (patch)
tree0178cb18853da2531a5b7ae074b853b0458c846f /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
parent9eecf98d7a861003ee18dd494617cf400b40b333 (diff)
downloadeclipse.platform.swt-ce15da912006c0de09dc46b1a9f9459d29684102.tar.gz
eclipse.platform.swt-ce15da912006c0de09dc46b1a9f9459d29684102.tar.xz
eclipse.platform.swt-ce15da912006c0de09dc46b1a9f9459d29684102.zip
Bug 463865 - Remove pre 2.18 GTK checks
Shell.set|getAlpha been done only for GTK 2.12+ which is always true so do it always. Change-Id: I57a9df6ee99ac178e7ace3c3af05c0c339a4c1fe Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 6b1ccd2035..6ee16b3d2c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -972,10 +972,8 @@ void forceResize (int width, int height) {
*/
public int getAlpha () {
checkWidget ();
- if (OS.GTK_VERSION >= OS.VERSION (2, 12, 0)) {
- if (OS.gtk_widget_is_composited (shellHandle)) {
- return (int) (OS.gtk_window_get_opacity (shellHandle) * 255);
- }
+ if (OS.gtk_widget_is_composited (shellHandle)) {
+ return (int) (OS.gtk_window_get_opacity (shellHandle) * 255);
}
return 255;
}
@@ -1745,11 +1743,9 @@ void setActiveControl (Control control, int type) {
*/
public void setAlpha (int alpha) {
checkWidget ();
- if (OS.GTK_VERSION >= OS.VERSION (2, 12, 0)) {
- if (OS.gtk_widget_is_composited (shellHandle)) {
- alpha &= 0xFF;
- OS.gtk_window_set_opacity (shellHandle, alpha / 255f);
- }
+ if (OS.gtk_widget_is_composited (shellHandle)) {
+ alpha &= 0xFF;
+ OS.gtk_window_set_opacity (shellHandle, alpha / 255f);
}
}

Back to the top