Community
Participate
Working Groups
my config: redhat linux 9 on a dell laptop running gnome jdk 1.4.1_02 eclipse-SDK-M20030521-linux-gtk.zip starts up, but when i want to start a new project (eg. file->new->project), a new window pops up, contents flash quickly but then disappear and i'm left with an all-white panel. when i close the dialog (via window widget) i see the contents again for a split second before the dialog disappears. downgraded to release version (2.1), now it works.
I'm unable to reproduce this problem (M20030521, on linux/gtk with jdk1.4.1_02). Is there something in your .log file? Do you have any non-standard plugins installed? Perhaps give us your configuration details (Help -> About Eclipse Platform -> Configuration Details).
Moving to SWT for comment. May be a GTK 2.2 specific problem.
The problem is that the modify event is being sent before the text is set in the widget. If I call setText and then in the modifyListener call getText I will get back the text before it was set. As a result my dialog determines that there is an error and displays it. The flash is due to an unneccessary second validation going on that does get it right. This is a GTK only problem. Downbgrading priority as this is only annoying but does not prevent people from working.
The problem is that OS.gtk_editable_delete_text (handle, 0, -1); is called before the text is inserted. This method fires the modified callback which causes the error.
I know how to fix this, but I not able to reproduce this bug on eclipse build# 200305280800. Tod, could come to see me so we can check this bug out ? Here is the fix for it (according with your description of the problem): this is bug-free implementation of Text.setText ;) public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); /* * Feature in GTK. */ string = verifyText (string, 0, getCharCount ()); if (string == null) return; byte [] buffer = Converter.wcsToMbcs (null, string, false); int blockHandle = (style & SWT.SINGLE) != 0 ? handle : bufferHandle; OS.g_signal_handlers_block_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.g_signal_handlers_block_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT); if ((style & SWT.SINGLE) != 0) { OS.g_signal_handlers_block_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT); OS.gtk_editable_delete_text (handle, 0, -1); int [] position = new int [1]; OS.gtk_editable_insert_text (handle, buffer, buffer.length, position); OS.gtk_editable_set_position (handle, 0); OS.g_signal_handlers_unblock_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_TEXT); } else { OS.g_signal_handlers_block_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_RANGE); byte [] position = new byte [ITER_SIZEOF]; OS.gtk_text_buffer_set_text (bufferHandle, buffer, buffer.length); OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, position, 0); OS.gtk_text_buffer_place_cursor (bufferHandle, position); OS.g_signal_handlers_unblock_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, DELETE_RANGE); } OS.g_signal_handlers_unblock_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); OS.g_signal_handlers_unblock_matched (blockHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, INSERT_TEXT); sendEvent (SWT.Modify); }
Could someone give me an update of the status of this bug on Windows on the 2.1.1 stream? This is a dependency for 37787, and I'm just trying to find out where we are with this.
This problem occurs on: Eclipse 2.1.1 on RedHat 9 and 8. This problem does not occur on: Eclipse 2.1 on RedHat 9 and 8. This can also be fixed by fixing the bug Bug#38349.
Not sure how changing a label to a text affects a redraw Felipe? Are you sure this is related to Bug 38349?
The problem is that on @#!$!@#%@#!%$ GTK we need to run an event loop inside of computeSize() to get it to work. Amazing and bad.
This bug is not related with computeSize, Bug#38213 is. I test this bug on Eclipse 2.1 and it works fine, I'm also sure that the SWT code released on 2.1.maintenance is not responsible for this. Maybe gtk label merges the paints drawing just after the second modify (hiding the bug), hard to tell though. I forgot to mention: if you type fast on the Text (project name) the caret gets behind. Is that true for you too Tod ?
Yes but I think this is an OS bug and nothing to do with SWT - I get it in the base applications (like the file browser) in Redhat 9.0 as well.
This is addressed (hidden) by the fix for bug 38213 which is going into 2.1.1. No action required for 2.1.1. Should look at a real fix in 3.0.
fix for bug#38213 was released.
I'm closing this bug as won't fix since: - Although I can workaround this GTK bug for the Text widget I can't fix it for Combo. - There is a bug report againt GTK for this: http://bugzilla.gnome.org/show_bug.cgi?id=64998 - The problem with the dialogs is fixed in HEAD and 2.1.1.
*** Bug 39491 has been marked as a duplicate of this bug. ***