Results 1 to 4 of 4

Thread: X11 close window by WId

  1. #1
    Join Date
    Mar 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default X11 close window by WId

    Hi there,

    I need to close a window on X11 (window of another application) where I just got a WId (window id). I already searched with Google for terms like "x11 close window by wid" and so on but there was no result that helped me.

    Do you have any idea how to do this? I thought that this must be easy but it isn't... at least for me

    Thanks in advance,
    webstar

  2. #2
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: X11 close window by WId

    Please note, that the killing of windows is NOT the killing of the process. THe window is not a process. You can kill windows by call XDestroyWindow. Or perhaps XKillClient. But, you'll need also to kill the process, using his pid and sending SIGKILL.

  3. #3
    Join Date
    Mar 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: X11 close window by WId

    Hey there,

    thanks for the reply. I don't want to kill the whole application but I want to close a single window. Does "destroying" a window is the normal way of closing it like e.g. when pressing the close-window-button in the window manager?

  4. #4
    Join Date
    May 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: X11 close window by WId

    Quote Originally Posted by webstar2568 View Post
    I need to close a window on X11 (window of another application) where I just got a WId (window id). I already searched with Google for terms like "x11 close window by wid" and so on but there was no result that helped me.
    I just tripped over a related problem. Acroread opened a window with a thumbnail of the document I was reading. It always was on top of the display (in all workspaces!) and I wanted to get rid of it w/o killing acroread. I had opened many documents in acroread. First, I got the Wid by starting xwininfo and clicking on the gadfly. Then I used xdotool windowkill 0x482bc1a to close the window.

    Alas, this killed acroread. The behaviour is quite unpredictable. While roxtron was afraid of not killing the application and leaving a zombie, I accidently killed the application.

    Hermann

Similar Threads

  1. Close window ( Doubt )
    By vitorlobo in forum Newbie
    Replies: 2
    Last Post: 9th February 2012, 12:57
  2. Qt4 - How to close a window?
    By ankeetguha in forum Newbie
    Replies: 1
    Last Post: 30th May 2011, 10:42
  3. Replies: 9
    Last Post: 16th May 2010, 17:21
  4. close window signal
    By jano_alex_es in forum Newbie
    Replies: 5
    Last Post: 22nd May 2009, 11:10
  5. How to close parent window from child window?
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 14th October 2008, 12:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.