After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 85709 - gtk_widget_get_pango_context() and private data
gtk_widget_get_pango_context() and private data
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: [obsolete] multihead
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: Erwann Chenede
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-06-17 20:56 UTC by Owen Taylor
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2002-06-17 20:56:03 UTC
gtk_widget_get_pango_context() contains:

  context = gtk_object_get_data_by_id (GTK_OBJECT (widget),
quark_pango_context);
  if (context)
    {
      screen = g_object_get_data (G_OBJECT (context), "gdk-pango-screen");
      if (screen && (screen != gtk_widget_get_screen (widget)))
	  context = NULL;
    }
 
If this is right thing to do, then we need to add
gdk_pango_context_get_screen(), since peeking at private object 
data like this is not allowed.

I'm a little concerned about colormap changes and the widget's
pango context ... we don't seem to handle this currently. Handling
it might automatically have the effect of handling screen changes
since a screen change automatically implies a colormap change.
Comment 1 Owen Taylor 2002-11-08 00:04:35 UTC
Thu Nov  7 18:50:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_get_pango_context): Note
        that get_pango_context() is not "until death does us
        part", but "until the screen changes".

        * gtk/gtkwidget.c (gtk_widget_create_pango_context): Add
        a MULTIHEAD warning.

        * gtk/gtkwidget.c (do_screen_change): Clear pango context
        for widget if set.

Ignoring colormap problems. Colormap changes after a widget
is realized already don't work.