Bug 14137 - gtk_text does not accept keyboard input very quickly
Summary: gtk_text does not accept keyboard input very quickly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gtk+
Version: 6.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Owen Taylor
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-07-17 17:11 UTC by Joe Acosta
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-08-04 03:28:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Joe Acosta 2000-07-17 17:11:54 UTC
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 19:29:30 UTC
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 04:41:34 UTC
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-24 02:21:37 UTC
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 13:52:15 UTC
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-04 03:28:30 UTC
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 15:20:58 UTC
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.