Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L
libwnck
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 128
    • Issues 128
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • libwnck
  • Issues
  • #146

Closed
Open
Opened Oct 30, 2020 by nlpsuge@nlpsuge

Wnck.Window.get(xid).get_application().get_n_windows() returns 1 even the app has multiple windows

Hi,

I'm using Python to get the number of windows of an app. But I found that I only get the value 1, even the app has 3 windows in my case.

My code:

def count_windows(xid: int) -> int:
    screen: Wnck.Screen = Wnck.Screen.get_default()
    screen.force_update()
    window: Wnck.Window = Wnck.Window.get(xid)
    app: Wnck.Application = window.get_application()
    return app.get_n_windows()

I've debugged. It seems like each window has their own Wnck.Application instance, so that their Wnck.Application instance has a window of course. And each app.get_name() has their different names too.

But this is quite hard to understand. I believe the result must be wrong. It, which is the rerult of the method app.get_n_windows(), can't be 1 but should be 3.

Is this some kinds of limitation on libwnck?

Please provide any information to me in case that I've missed something.

Thank you very very much!

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/libwnck#146