Awn

Applet Dialog (libawn) Position not always correct

Bug #132137 reported by Timon_and_Pumba
4
Affects Status Importance Assigned to Milestone
Awn
Fix Released
Undecided
Unassigned

Bug Description

The size&position fuction <awn_applet_dialog_position_reset> in libawn does not always set the position when it is needed. It connects to the "realize" event, which works fine if the dialog is static (i.e. on hide/show the dialog gets repositioned). My applet has "dynamic" content, meaning it changes its size while visible. To work in all cases, it should connect (for example) to the size-request signal.

Very simple patch (maybe function renaming would also be nice):

=== modified file 'libawn/awn-applet-dialog.c'
--- libawn/awn-applet-dialog.c 2007-08-11 16:43:56 +0000
+++ libawn/awn-applet-dialog.c 2007-08-13 07:10:39 +0000
@@ -91,7 +91,7 @@

         g_signal_connect(G_OBJECT(dialog), "key-press-event",
                          G_CALLBACK(_on_key_press_event), NULL);
- g_signal_connect(G_OBJECT(dialog), "realize",
+ g_signal_connect(G_OBJECT(dialog), "size-request",
                          G_CALLBACK(_on_realize), NULL);
 }

Revision history for this message
Neil J. Patel (njpatel) wrote :

Fixed in latest bzr :-).

Changed in awn:
status: New → Fix Committed
Revision history for this message
Timon_and_Pumba (timonterbraak) wrote :

latest bzr still has a little thing: it does not take the size of the applet into account, like this:

[line 87] x = ax - w/2 + aw/2;

Revision history for this message
Timon_and_Pumba (timonterbraak) wrote :

And on my computer the dialog is a little too high above the applet.
I allocated heightxheight (48x48) for my applet, but the real height is bigger due to the bounce effect.
Therefor the space between the applet and the dialog is >48 pixels.

Nice would be:

[line 88] y = ay - h + ah;

Revision history for this message
Neil J. Patel (njpatel) wrote :

Nice catch! Fixed in latest bzr. Also, it will add the 'icon_offset' to the y, so it is nicely over the applet now (and matches with the height of the title)

Changed in awn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.