Google Grup tidak lagi mendukung postingan atau langganan Usenet baru. Konten lama masih dapat dilihat.

[winfo id] does not return as [xwininfo] does

55 kali dilihat
Langsung ke pesan pertama yang belum dibaca

tombert

belum dibaca,
4 Mei 2019, 19.36.5504/05/19
kepada
Why is that different:

In a wish type:
% toplevel .test
% winfo id .test
0x3a001ba

In a terminal type [xwininfo] and click on the toplevel:
xwininfo: Window id: 0x3a001bb "test"

Why do these methods return different IDs!?

thx

tombert

belum dibaca,
4 Mei 2019, 19.45.4904/05/19
kepada
Note that it's not always one off, but in my app the offset is 20:

xwininfo returns 0x2e007b1
winfo id returns 0x2e0079d

Donal K. Fellows

belum dibaca,
5 Mei 2019, 06.34.1005/05/19
kepada
On 05/05/2019 00:36, tombert wrote:
> Why do these methods return different IDs!?

Because there are extra layers of X window involved. Tk adds an extra
one to enable it to put a menu bar in for the -menu option, and the
window manager often adds multiple windows of its own to do its decorations.

Donal.
--
Donal Fellows — Tcl user, Tcl maintainer, TIP editor.

tombert

belum dibaca,
5 Mei 2019, 08.46.4105/05/19
kepada
So means that I have to find all it's parents/children of a specific ID?
Would you be so kind providing me a tip what you would do?

I need this for xwininfo -id <id> to query the iconified state since this is the other thing that is not working ...

two...@gmail.com

belum dibaca,
5 Mei 2019, 21.23.5305/05/19
kepada
On Sunday, May 5, 2019 at 5:46:41 AM UTC-7, tombert wrote:

>
> I need this for xwininfo -id <id> to query the iconified state since this is the other thing that is not working ...

Have you considered using -name instead of -id,

xwininfo -name <title>

you can set the title in tk with

wm title . hello

and then, after minimizing the window,

$ xwininfo -name hello -wm

xwininfo: Window id: 0x240000a "hello"

Window manager hints:
Client accepts input or input focus: Yes
Initial state is Normal State
Displayed on desktop 0
Window state:
Hidden
Process id: (unknown)
Frame extents: 0, 0, 37, 0


This is from my pop os variant of ubuntu, with gnome.

tombert

belum dibaca,
6 Mei 2019, 01.47.1206/05/19
kepada
Yes I have considered this, but since the name is not necessarily unique it's not a way to go for me.

thx
0 pesan baru