Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5941177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:04:24+00:00 2026-05-22T16:04:24+00:00

Context: There was once a post on preventing window overlap with Gtk+2.x Recent changes

  • 0

Context:

There was once a post on preventing window overlap with Gtk+2.x Recent changes in Gtk+3 have however affected the gdk_property_change() function, which has the PyGobject Introspection (hereafter referred to as PyGI) equivalent of Gdk.property_change(). In the previous SO answer the property_change arguments were of type (str, str, Gdk.PROP_MOD_*, int, data), the Gtk+3 equivalent asks instead for (GdkWindow, GdkAtom, GdkAtom, int, GdkPropMode, data, int). Passing a GdkAtom as argument rather than a string seems to be the new requirement.

Problem:

New Gdk.Atom can be created with PyGtk with the gtk.gdk.atom_intern(str) method. The corresponding C function in the documentation is gdk_atom_intern(). There is however no such method in PyGI: a mere dir(Gtk) will return Gdk.Atom or Gdk.atom_name but no Gdk.atom_intern. The Gdk.Atom has no apparent method either. PS: it seems reading this code at line 139 that Gdk.atom_intern() would be available though.

Question:

Do you know how I could create (or find out how to create) a Gdk.Atom using PyGI with Gtk+3?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:04:25+00:00Added an answer on May 22, 2026 at 4:04 pm

    It might be that Gobject-Introspection picks up Gdk from Gtk+-2.0 version, so you have to force the version:

    In [1]: import gi  
    In [2]: gi.require_version("Gdk", "3.0")   
    In [3]: from gi.repository import Gdk    
    In [4]: Gdk.__path__
    Out[4]: '/usr/lib64/girepository-1.0/Gdk-3.0.typelib'    
    In [5]: Gdk.atom_intern
    Out[5]: <function atom_intern at 0x152f140>    
    In [6]: Gdk.atom_intern_static_string
    Out[6]: <function atom_intern_static_string at 0x152f398>
    

    For this to work, the gir1.2-gtk-3.0 package is needed. On Ubuntu it can be installed from repositories with sudo apt-get install gir1.2-gtk-3.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe i have the wrong context but... Is there a corelib site for mysql
Earlier today I posted another post where @Darin Dimitrov helped me great, however once
Is there a Chrome extension post install hook/API function that will let me perform
Context: There's an application where you draw things on canvas. Where user clicks there's
(See question below for more context): Are there any situations in which <machineKey validationKey=AutoGenerate,IsolateApps
Is there a way to change the context sensitive help in Visual Studio so
Is there any way to validate spring context xml files in eclipse? Features like:
Is there a way to use data from the current context to filter nodes
Is there a way to see how many context switches each thread generates? (both
There doesn't seem to be a default context menu (with copy, paste, etc.) for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.