Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#2025 closed patch (duplicate)

System tray icon has the wrong size

Reported by: Dima Owned by:
Milestone: Component: pidgin (gtk)
Version: 2.0.2 Keywords:
Cc:

Description

When Pidgin starts up when I log in to KDE, its system tray icon is too big - 32x32 px, while the rest of the icons are 22x22. If I close it and start again, the icon has the correct size.

The size of my kicker panel is set to "Custom", 40px.

Attachments (5)

pidgin-icon.png (11.8 KB) - added by Dima 12 years ago.
Screenshot
tray_big.png (3.5 KB) - added by asenci 12 years ago.
Big tray icon
tray_small.png (3.1 KB) - added by asenci 12 years ago.
Small tray icon
pidgintray.png (42.7 KB) - added by Kalex 11 years ago.
1. Pidgin after KDE startup, 2. second instance running, 3. after restarting Pidgin
2025-workaround1.patch (660 bytes) - added by gagern 11 years ago.
Workaround and debug code as described in comment:6

Download all attachments as: .zip

Change History (15)

Changed 12 years ago by Dima

Screenshot

comment:1 Changed 12 years ago by lithium

The tray icon size is a strange thing... my gnome panel is 24px in size and sometimes (cannot reproduce) pidgin starts with a 16x16 icon, normally it uses the bigger (24x24 I think) size

Changed 12 years ago by asenci

Big tray icon

Changed 12 years ago by asenci

Small tray icon

comment:2 Changed 12 years ago by asenci

I have the same effect when using a vertical notification area (big icon). By disabling and re-enabling the tray icon in the preferences several times I could change the icon to a small size, but when I close Pidgin and re-open it the icon is shown big again.

comment:3 Changed 12 years ago by seanegan

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1721 which is fixed.

comment:4 Changed 11 years ago by Kalex

Please reopen. Not dupe and also not fixed, as noted in the last comment of #1721 itself. Might be related to #4036 though.

In my case, Pidgin starts with a huge tray icon, when ran on startup (KDE 3.5.6, Kubuntu 7.04). After running a second instance of Pidgin, or after restarting the program, it uses a normal-sized icon. It's been doing it since Gaim, and since ever. No other program suffers from this. I'm using Pidgin compiled from source.

Just why might this be happening?

Changed 11 years ago by Kalex

  1. Pidgin after KDE startup, 2. second instance running, 3. after restarting Pidgin

comment:5 Changed 11 years ago by gagern

Still an issue in Pidgin 2.4.0 here on KDE 3.5.9, Gentoo 2007.0 ~x86. I second the request to reopen this ticket.

The issue was also reported in #2466 comment 1 and 5, and the fix for that bug doesn't address this.

comment:6 Changed 11 years ago by gagern

Some details on the setup mentioned in comment:5. My KDE Panel has Size "Large" on a 94dpi screen. Usually my tray icons are arranged in two rows, and each seems to have 22px. When pidgin starts, it usually displays too large an icon, leading to a single row arrangement for all icons. Disabling and re-enabling the tray icon of pidgin has a good chance of solving the issue, but at times I have to repeat this several times until it works. This seems a lot like a race condition to me.

I added a bit of debug code to docklet_x11_resize_icon in pidgin/gtkdocklet-x11.c of the pidgin-2.4.0 release:

purple_debug(PURPLE_DEBUG_INFO, "docklet",
             "resized from %d to %dx%d\n",
	     docklet_height,
             widget->allocation.height, widget->allocation.width);

With this in place, I did a test run. I got a large icon when pidgin was started, and a correctly sized after disabling it once. The trace says:

(18:31:52) docklet: resized from 0 to 200x200
(18:31:52) gtkblist: added visibility manager: 1
(18:31:52) docklet: created
... further startup, loading plugins ...
(18:31:53) docklet: embedded
(18:31:53) docklet: resized from 200 to 48x48
(18:31:53) docklet: resized from 48 to 48x48
... disabling tray icon ...
(18:32:14) gtkblist: removed visibility manager: 0
(18:32:14) docklet: destroyed
(18:32:14) prefs: /pidgin/docklet/show changed, scheduling save.
(18:32:14) prefs: /pidgin/blist/list_visible changed, scheduling save.
... enabling tray icon ...
(18:32:17) docklet: resized from 48 to 200x200
(18:32:17) gtkblist: added visibility manager: 1
(18:32:17) docklet: created
(18:32:17) prefs: /pidgin/docklet/show changed, scheduling save.
(18:32:17) docklet: resized from 200 to 200x200
(18:32:17) docklet: resized from 200 to 48x48
(18:32:17) docklet: resized from 48 to 48x48
(18:32:17) docklet: embedded
(18:32:17) docklet: resized from 48 to 48x48
(18:32:17) docklet: resized from 48 to 30x100
(18:32:17) docklet: resized from 30 to 22x22
(18:32:17) docklet: resized from 22 to 22x22

I have no clue where these 200x200 size comes from. I tried a version that returned from docklet_x11_resize_icon immediately if the allocation area was 200x200. So far I always got the correct size with a version modified in this way, so it might be a viable workaround. For comparison, with this hack in place the debug trace looks like this:

(18:43:30) docklet: resized from 0 to 200x200
(18:43:30) gtkblist: added visibility manager: 1
(18:43:30) docklet: created
... further startup, loading plugins ...
(18:43:31) docklet: embedded
(18:43:31) docklet: resized from 0 to 22x22
(18:43:31) docklet: resized from 22 to 22x22
... disabling tray icon ...
(18:43:37) gtkblist: removed visibility manager: 0
(18:43:37) docklet: destroyed
(18:43:37) prefs: /pidgin/docklet/show changed, scheduling save.
... enabling tray icon ...
(18:43:39) docklet: resized from 22 to 200x200
(18:43:39) gtkblist: added visibility manager: 1
(18:43:39) docklet: created
(18:43:39) prefs: /pidgin/docklet/show changed, scheduling save.
(18:43:39) docklet: embedded
(18:43:39) docklet: resized from 22 to 200x200
(18:43:39) docklet: resized from 22 to 30x100
(18:43:39) docklet: resized from 30 to 30x100
(18:43:39) docklet: resized from 30 to 22x22
(18:43:39) docklet: resized from 22 to 22x22

I hope some of this might help identifying and solving the issue. If I can provide more information, please let me know.

comment:7 Changed 11 years ago by resiak

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Changed 11 years ago by gagern

Workaround and debug code as described in comment:6

comment:8 Changed 11 years ago by datallah

  • Type changed from defect to patch

comment:9 Changed 11 years ago by charkins

  • Resolution set to duplicate
  • Status changed from reopened to closed

I'm closing this ticket as a duplicate of #2466. I still don't have a solution for this and will keep investigating it. I'm hoping the migrating to GtkStatusIcon? will fix this in cases where it is used. Older gtk versions might just get stuck with the broken behavior.

comment:10 Changed 10 years ago by darkrain42

Ticket #6161 has been marked as a duplicate of this ticket.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!