Bug 14137 - gtk_text does not accept keyboard input very quickly
gtk_text does not accept keyboard input very quickly
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: gtk+ (Show other bugs)
6.2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Owen Taylor
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-07-17 13:11 EDT by Joe Acosta
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-08-03 23:28:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joe Acosta 2000-07-17 13:11:54 EDT
I am not sure if this is a gtk problem or if it is a REdhat specific bug just yet.  It seemt that at work I am using gtk 1.2.3.  When I compile my 
program there it runs just fine (gtk and Solaris) however when I compile this program at home (gtk and Redhat 6.2) I have problems. 

The problem is this:I have  a  text widget that I create with gtk_text_new().  The initial size is 500x300.  When I use this size and start typing into 
the text area the data types in just fine.  However when I resize the window from 500 to 600 or 700 or larger then typing into the text area gets 
immensly slow. Since the same results were not achieved under Solaris I know that it is not my code.  I believe that Redhat 6.2 comes with 
gtk1.2.6.

The text widget is created as follows:    GtkWidget *text;        text = gtk_text_new(NULL, NULL);  gtk_widget_show(text); 

with a windows that has an initial size of 500x300.   I have tried just creating a text area with no other widget and it still occured.  

The strange this is that GXedit does not have this problem, however I think that GXedit uses another gtk text widget.

If there is another widget that I can use as my text that is include in either gnome or gtk I can substitute that as a workaround, but this is still a 
bug and I have several programs that are now using this widget.
Comment 1 Owen Taylor 2000-07-17 15:29:30 EDT
Are you using a theme? I've seen reports of behavior like this with
some pixmap themes, though I don't understand why that would happen.
Comment 2 Joe Acosta 2000-07-22 00:41:34 EDT
I noticed it happens with certain gtk themes. In particular the theme called
"blue theme" and "blue steel" under gnome. It started in RH 6.1 with gtk 1.2.5.
I know that if I change themes to "basic" it goes away. It may be in the
gtk-themes package.
Comment 3 Joe Acosta 2000-07-23 22:21:37 EDT
I have found a workaround that seems to work, although I don't know why.  I
basically reset teh style.  Here is a code snippet.

        GtkStyle *curstyle;
        GtkWidget *text;

        text = gtk_text_new(NULL, NULL);

        curstyle = gtk_widget_get_style(text);
        gtk_widget_set_style(text, curstyle);

        gtk_widget_show(text);
Comment 4 Owen Taylor 2000-08-03 09:52:15 EDT
So, does this happen only with your own code or also with 
other GtkText widgets? Do you see the problem with, say,
gedit?
Comment 5 Joe Acosta 2000-08-03 23:28:30 EDT
Yes it happens in the gedit program also but not as much. First the gedit text
widget is not as large as mine, I put mine in a viewport so I can get horizontal
and verticle scroll bars. I also resize the text widgets to be large enough to
contain the text with not scrolling, thus the viewport is used to see the area
of interest. It also seems that gedit sets the style and does not use the style
that is set by the window manager, so the font is a different font than the
theme font.    My guess is that gedit does something like

font = 'some gont';

style = gtk_text_get_style(wiget);
style->font = font;
gtk_widget_set_style(widget,style);

There is hesitance in typing in text in gedit, however it is not as noticable as
in my editor.
Comment 6 Owen Taylor 2001-07-20 11:20:58 EDT
This is upstream as:

  http://bugzilla.gnome.org/show_bug.cgi?id=4485

We've never tracked this down; I've never been able to reproduce
it myself. Both the GtkText widget and the "pixmap" theme
engine are being replaced with total rewrites for GTK+-2.0,
so it's pretty safe to say this problem will go away.

For now, the workaround is simply not to use a pixmap theme.

Note You need to log in before you can comment on or make changes to this bug.