aMSN Forums
May 22, 2013, 04:06:45 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Getting aMSN tray icon position/name on KDE4  (Read 5404 times)
DSX
Newbie

Offline Offline

Posts: 6


View Profile
« on: April 13, 2010, 11:49:40 am »

Hi,

I'm trying to get the position of the aMSN tray icon, but i can't with xwininfo:
Code:
xwininfo -root -tree|grep -i msn
     0x2a0011a "MSN Protocol Debug": ("degt" "Toplevel")  1x1+0+0  +0+0
     0x2a00118 "MSN Command": ("nscmd" "Toplevel")  1x1+0+0  +0+0
     0x2a000d8 "Status Log - aMSN": ("status" "Toplevel")  1x1+0+0  +0+0
     0x2a0000c "aMSN - xx@xx.xxx": ("amsn" "Amsn")  251x600+641+23  +641+23

Tray icons on my system are at position +744:
Code:
$ xwininfo -root -tree|grep 744
        0x1dfab17 (has no name): ()  22x22+861+4  +861+744
           0x2a00123 (has no name): ()  22x22+0+0  +861+744
        0x1c009f8 (has no name): ()  22x22+835+4  +835+744
           0x2400004 "fusion-icon": ("fusion-icon" "Fusion-icon")  22x22+0+0  +835+744
        0x1c0063c (has no name): ()  22x22+809+4  +809+744
           0x2000021 "klipper": ("klipper" "Klipper")  22x22+0+0  +809+744

The first line actually represents the aMSN tray icon. As you can see it 'has no name', whereas my other tray icons do.
I went through the code in gui.tcl and config.tcl and fiddled around with 'wm iconname' but so far no luck on getting an actual name in there.

Any help would be much appreciated. Thnx.

Logged
alexandernst
Developers
Super Power User
*
Offline Offline

Posts: 870



View Profile
« Reply #1 on: April 14, 2010, 11:51:56 am »

Code:
[alexandernst@stupidbox ~]$ xwininfo -root -tree|grep -i msn
     0x180000c "aMSN - alexandernst@gmail.com": ("amsn" "Amsn")  481x732+2652+200  +2652+200
     0x200019f "Quassel IRC - #amsn-ot": ("quassel" "Quassel")  1280x964+1920+56  +1920+56
     0x1878daf "aMSN": ("smile_selector" "Toplevel")  392x314+2091+488  +2091+488
     0x1800125 "MSN Protocol Debug": ("degt" "Toplevel")  1x1+0+0  +0+0
     0x1800123 "MSN Command": ("nscmd" "Toplevel")  1x1+0+0  +0+0
     0x18000e9 "Status Log - aMSN": ("status" "Toplevel")  1x1+0+0  +0+0
           0x2a01f33 "Getting aMSN tray icon position/name on KDE4 - Opera": ("opera" "Opera")  1920x1022+0+0  +0+20
                       0x2a82389 "Getting aMSN tray icon position/name on KDE4": ()  1926x971+-3+-21  +-3+55
                       0x2b21d96 "aMSN Forums": ()  1926x971+-1926+0  +-1926+76
[alexandernst@stupidbox ~]$

What subversion of KDE4 are you using? What version of amsn?
Logged
DSX
Newbie

Offline Offline

Posts: 6


View Profile
« Reply #2 on: April 14, 2010, 01:20:10 pm »

kde-4.3.5
aMSN-0.98.3
xwininfo-1.0.5
Gentoo, kernel 2.6.31-gentoo-r10

Looks like grepping xwininfo for msn on your stupidbox doesn't reveal the tray icon either ?
Logged
alexandernst
Developers
Super Power User
*
Offline Offline

Posts: 870



View Profile
« Reply #3 on: April 15, 2010, 01:43:59 pm »

I think yes :s
Isn't that what you want?
Code:
0x180000c "aMSN - alexandernst@gmail.com": ("amsn" "Amsn")  481x732+2652+200  +2652+200
Logged
DSX
Newbie

Offline Offline

Posts: 6


View Profile
« Reply #4 on: April 15, 2010, 03:30:15 pm »

Sorry, no. That's your main aMSN window: it's size is 481x732 and top left corner position is 2652+200.
Tray icons have a square size annotation like 22x22 or 33x33.

Every icon i can get in my tray has a name, except aMSN's icon.

Logged
alexandernst
Developers
Super Power User
*
Offline Offline

Posts: 870



View Profile
« Reply #5 on: April 15, 2010, 08:05:44 pm »

Uuups, you're right Smiley
I fixed it in 12018. Now amsn-tray name is... "amsn-tray"... I spent a lot of time thinking of a name, lol :p
Logged
DSX
Newbie

Offline Offline

Posts: 6


View Profile
« Reply #6 on: April 15, 2010, 11:56:01 pm »

amsn-tray, who would've thought of that.   Grin

Thanks for the fix, but:
Code:
$ ./configure && make
<snipped>
  CC      utils/linux/capture/libng/plugins/struct-v4l.o
  LD      utils/linux/capture/libng/plugins/drv1-v4l.so
  CC      utils/linux/capture/libng/plugins/sn9c10x.o
  LD      utils/linux/capture/libng/plugins/sn9c10x.so
  CC      utils/linux/traydock/libtray.o
utils/linux/traydock/libtray.c: In function ‘DockIcon’:
utils/linux/traydock/libtray.c:175: error: ‘app_name’ undeclared (first use in this function)
utils/linux/traydock/libtray.c:175: error: (Each undeclared identifier is reported only once
utils/linux/traydock/libtray.c:175: error: for each function it appears in.)
make: *** [utils/linux/traydock/libtray.o] Error 1
rm utils/gupnp/gupnp.o

Oh and btw, the amsn_dev.tar.gz contains 12013, not 12018.

Logged
alexandernst
Developers
Super Power User
*
Offline Offline

Posts: 870



View Profile
« Reply #7 on: April 16, 2010, 07:06:39 am »

Uh, I fixed that compile error in 12019 Wink
Yeah, credits for my stupidbox :p
I'm gonna check the .tar.gz, thx
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #8 on: April 16, 2010, 09:14:39 am »

The .tar.gz is updated once a day, it's 12013 today, it will be 12019 tomorrow..
good job alex!
Logged

KaKaRoTo
Bocko
Newbie

Offline Offline

Posts: 45


View Profile
« Reply #9 on: April 16, 2010, 10:50:36 am »

I played around with that position thing and here is what I get for aMSN:
Code:
xwininfo -root -tree|grep -i msn
     0x40013e "MSN Protocol Debug": ("degt" "Toplevel")  1x1+0+0  +0+0
     0x40013c "MSN Command": ("nscmd" "Toplevel")  1x1+0+0  +0+0
     0x400105 "Status Log - aMSN": ("status" "Toplevel")  1x1+0+0  +0+0
     0x6000032 "amsn-tray": ()  10x10+-100+-100  +-100+-100
        0x40000c "aMSN - xxx@hotmail.com": ("amsn" "Amsn")  357x745+6+23  +917+49
        0x2003302 "amsn - File Browser": ("nautilus" "Nautilus")  813x535+6+23  +457+57

while I have for Pidgin (and it's similar for other trayicons):
Code:
xwininfo -root -tree|grep -i pidgin
     0x1c00069 "Buddy List": ("Pidgin" "Pidgin")  277x745+991+26  +991+26
     0x1c00001 "Pidgin": ("Pidgin" "Pidgin")  10x10+10+10  +10+10

As shown, there is a "+-100+-100" for aMSN while there is "+10+10" for all my other trayicons.
I think it can be a hint to solve the bug from this post: http://www.amsn-project.net/forums/index.php/topic,7666.0.html
While it's just a guess since I don't know a lot about this...
« Last Edit: April 16, 2010, 10:58:29 am by Bocko » Logged

Bocko The ChocobOST
alexandernst
Developers
Super Power User
*
Offline Offline

Posts: 870



View Profile
« Reply #10 on: April 16, 2010, 11:54:50 am »

Code:
[alexandernst@stupidbox amsn]$ xwininfo -root -tree | grep -i tray
     0x1a00137 "amsn-tray": ("plasma-desktop" "Plasma-desktop")  960x432+0+0  +0+0
[alexandernst@stupidbox amsn]$

Bocko, what DE are you using?
Logged
DSX
Newbie

Offline Offline

Posts: 6


View Profile
« Reply #11 on: April 16, 2010, 04:03:41 pm »

Thnx for fixing the compile error, however.... (uhohw, here he goes again! Tongue)

Although amsn-tray is in the list now, it doesn't give the actual icon position:
Code:
$ xwininfo -root -tree|grep -i amsn-tray
     0x16000b4 "amsn-tray": ("plasma-desktop" "Plasma-desktop")  512x307+0+0  +0+0

Compare this to fusion-icon: (indented one is the actual icon)
Code:
$ xwininfo -root -tree|grep -i fusion-icon
     0x240006b "fusion-icon": ("fusion-icon" "Fusion-icon")  242x169+615+575  +615+575
     0x240009c "fusion-icon": ("fusion-icon" "Fusion-icon")  207x69+410+688  +410+688
               0x2400004 "fusion-icon": ("fusion-icon" "Fusion-icon")  22x22+0+0  +835+744
     0x2400001 "fusion-icon": ("fusion-icon" "Fusion-icon")  10x10+10+10  +10+10

Also, grepping for +744 (which on my system is the vertical position of my tray-icons) still gives 'has no name' for the icon at +861+744:
Code:
$ xwininfo -root -tree|grep +744
        0x16f8de0 (has no name): ()  22x22+861+4  +861+744
           0x1a00122 (has no name): ()  22x22+0+0  +861+744
        0x160091a (has no name): ()  22x22+835+4  +835+744
           0x2400004 "fusion-icon": ("fusion-icon" "Fusion-icon")  22x22+0+0  +835+744
        0x160073b (has no name): ()  22x22+809+4  +809+744
           0x2000021 "klipper": ("klipper" "Klipper")  22x22+0+0  +809+744

So, close but no cigar.  Grin

I think it's awesome you want to help me out, but please, only put time and effort into this if you really really want to fix it .
I can live without getting that icon position, it's no biggy.

(oh and 'SVN Version' on the 'About aMSN' screen shows 12013, not 12019)
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #12 on: April 16, 2010, 05:48:59 pm »

the "SVN Version" on the about page shows the SVN version of the latest modification to .tcl files, what this means in your case is that all the commits from 12014 to 12019 didn't change any tcl file (some are the .c file of the tray icon, others are on plugins that are not part of the amsn core tcl files...)
Logged

KaKaRoTo
DSX
Newbie

Offline Offline

Posts: 6


View Profile
« Reply #13 on: April 16, 2010, 06:33:39 pm »

Ack. Thnx for the info.
Logged
Bocko
Newbie

Offline Offline

Posts: 45


View Profile
« Reply #14 on: April 16, 2010, 06:53:08 pm »

Code:
[alexandernst@stupidbox amsn]$ xwininfo -root -tree | grep -i tray
     0x1a00137 "amsn-tray": ("plasma-desktop" "Plasma-desktop")  960x432+0+0  +0+0
[alexandernst@stupidbox amsn]$

Bocko, what DE are you using?

I'm using Gnome-Shell for testing purposes but it gives me the same result in Gnome 2.28.
« Last Edit: April 16, 2010, 08:10:05 pm by Bocko » Logged

Bocko The ChocobOST
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!