diff options
author | Felipe Heidrich <fheidric> | 2009-11-20 22:23:58 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2009-11-20 22:23:58 +0000 |
commit | d5f017a2e1351cda1ec08304c52846186e9dc7b5 (patch) | |
tree | fc3e1d4c002805a17ddab3a0337c23dca78d7cc1 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java | |
parent | 491ee4b96e01eebd57ff64561cf636dbd3beb626 (diff) | |
download | eclipse.platform.swt-d5f017a2e1351cda1ec08304c52846186e9dc7b5.tar.gz eclipse.platform.swt-d5f017a2e1351cda1ec08304c52846186e9dc7b5.tar.xz eclipse.platform.swt-d5f017a2e1351cda1ec08304c52846186e9dc7b5.zip |
Bug 274963 - Can't restore column widths
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index ea79cd0b57..115c7f8299 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java @@ -691,6 +691,35 @@ public void setWidth (int width) { if (width != 0) OS.gtk_widget_realize (parent.handle); OS.gtk_tree_view_column_set_visible (handle, width != 0); lastWidth = width; + /* + * Bug in GTK. When the column is made visible the event window of column + * header is raised above the gripper window of the previous column. In + * some cases, this can cause the previous column to be not resizable by + * the mouse. The fix is to find the event window and lower it to bottom to + * the z-order stack. + */ + if (width != 0) { + if (buttonHandle != 0) { + int /*long*/ window = OS.gtk_widget_get_parent_window (buttonHandle); + if (window != 0) { + int /*long*/ windowList = OS.gdk_window_get_children (window); + if (windowList != 0) { + int /*long*/ windows = windowList; + int /*long*/ [] userData = new int /*long*/ [1]; + while (windows != 0) { + int /*long*/ child = OS.g_list_data (windows); + OS.gdk_window_get_user_data (child, userData); + if (userData[0] == buttonHandle) { + OS.gdk_window_lower (child); + break; + } + windows = OS.g_list_next (windows); + } + OS.g_list_free (windowList); + } + } + } + } sendEvent (SWT.Resize); } |