Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 262974
Collapse All | Expand All

(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java (+18 lines)
Lines 138-144 Link Here
138
	if ((style & (SWT.ICON_ERROR)) != 0)    messageType = OS.GTK_MESSAGE_ERROR;
138
	if ((style & (SWT.ICON_ERROR)) != 0)    messageType = OS.GTK_MESSAGE_ERROR;
139
	
139
	
140
	byte [] buffer = Converter.wcsToMbcs (null, fixPercent (message), true);
140
	byte [] buffer = Converter.wcsToMbcs (null, fixPercent (message), true);
141
	
141
	handle = OS.gtk_message_dialog_new(parentHandle, dialogFlags, messageType, 0, buffer);
142
	handle = OS.gtk_message_dialog_new(parentHandle, dialogFlags, messageType, 0, buffer);
143
	if (true) {
144
		int /*long*/ xDisplay = OS.GDK_DISPLAY();
145
		int /*long*/ xParentWindow = OS.gdk_x11_drawable_get_xid(OS.GTK_WIDGET_WINDOW(OS.gtk_widget_get_toplevel(parent.handle)));
146
		int /*long*/ [] unused = new int /*long*/ [1];
147
		int /*long*/ [] parentWindow = new int /*long*/ [1];
148
		int /*long*/ [] rooWindow = new int /*long*/ [1];
149
		int count = 0;
150
		do {
151
			OS.XQueryTree(xDisplay, xParentWindow, rooWindow, parentWindow, unused, unused);
152
			if (parentWindow [0] == rooWindow [0]) break;
153
			xParentWindow = parentWindow [0];
154
		} while (xParentWindow != 0);
155
		OS.gtk_widget_realize(handle);
156
		int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid(OS.GTK_WIDGET_WINDOW(OS.gtk_widget_get_toplevel(handle)));
157
		OS.XSetTransientForHint(OS.GDK_DISPLAY(), xWindow, xParentWindow);
158
	}
159
	
142
	if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
160
	if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
143
	if (parentHandle != 0) {
161
	if (parentHandle != 0) {
144
		int /*long*/ pixbufs = OS.gtk_window_get_icon_list (parentHandle);
162
		int /*long*/ pixbufs = OS.gtk_window_get_icon_list (parentHandle);

Return to bug 262974