Mercurial > projects > dwt-win
comparison dwt/custom/CCombo.d @ 194:3afcd4ddcf90
Update to SWT 3.3.2
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 19 Mar 2008 21:48:31 +0100 |
parents | a5afe31f5cdd |
children | ab60f3309436 |
comparison
equal
deleted
inserted
replaced
193:d0bbd290530f | 194:3afcd4ddcf90 |
---|---|
1085 case DWT.Close: | 1085 case DWT.Close: |
1086 event.doit = false; | 1086 event.doit = false; |
1087 dropDown (false); | 1087 dropDown (false); |
1088 break; | 1088 break; |
1089 case DWT.Deactivate: | 1089 case DWT.Deactivate: |
1090 dropDown (false); | 1090 /* |
1091 * Bug in GTK. When the arrow button is pressed the popup control receives a | |
1092 * deactivate event and then the arrow button receives a selection event. If | |
1093 * we hide the popup in the deactivate event, the selection event will show | |
1094 * it again. To prevent the popup from showing again, we will let the selection | |
1095 * event of the arrow button hide the popup. | |
1096 */ | |
1097 if ("gtk".equals(DWT.getPlatform())) { | |
1098 Point point = arrow.toControl(getDisplay().getCursorLocation()); | |
1099 Point size = arrow.getSize(); | |
1100 Rectangle rect = new Rectangle(0, 0, size.x, size.y); | |
1101 if (!rect.contains(point)) dropDown (false); | |
1102 } else { | |
1103 dropDown(false); | |
1104 } | |
1091 break; | 1105 break; |
1092 default: | 1106 default: |
1093 } | 1107 } |
1094 } | 1108 } |
1095 public override void redraw () { | 1109 public override void redraw () { |