[maemo-commits] [maemo-commits] r13774 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Sep 12 13:43:56 EEST 2007
- Previous message: [maemo-commits] r13773 - projects/haf/branches/osso-gnomevfs-extra
- Next message: [maemo-commits] r13775 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: jobi Date: 2007-09-12 13:43:55 +0300 (Wed, 12 Sep 2007) New Revision: 13774 Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c Log: 2007-09-12 Johan Bilien <johan.bilien at nokia.com> * libhildondesktop/hildon-desktop-home-area.c: propagate double- and triple-clicks to the child. Fixes: NB#66429 Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-09-12 10:37:26 UTC (rev 13773) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-09-12 10:43:55 UTC (rev 13774) @@ -1,5 +1,11 @@ 2007-09-12 Johan Bilien <johan.bilien at nokia.com> + * libhildondesktop/hildon-desktop-home-area.c: propagate double- + and triple-clicks to the child. + Fixes: NB#66429 + +2007-09-12 Johan Bilien <johan.bilien at nokia.com> + * libhildondesktop/hildon-desktop-home-area.c: ignore double- and triple- click button events. Fixes: NB#69026 Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c 2007-09-12 10:37:26 UTC (rev 13773) +++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c 2007-09-12 10:43:55 UTC (rev 13774) @@ -1275,7 +1275,6 @@ gdk_event_put ((GdkEvent *)crossing_event); ((GdkEventAny *)event)->window = g_object_ref (child); - ((GdkEventAny *)event)->type = GDK_BUTTON_PRESS; gdk_event_put ((GdkEvent *)event); } @@ -1325,14 +1324,12 @@ hildon_desktop_home_item_button_press_event (GtkWidget *w, GdkEventButton *event) { + HildonDesktopHomeItem *item; HildonDesktopHomeItemPriv *priv; priv = HILDON_DESKTOP_HOME_ITEM_GET_PRIVATE (HILDON_DESKTOP_HOME_ITEM (w)); + item = HILDON_DESKTOP_HOME_ITEM (w); - /* ignore double and triple click button events */ - if (event->type != GDK_BUTTON_PRESS) - return FALSE; - /* ignore events which do not occur on our event windows (typically * events we propagated to the bin */ if (event->window != priv->event_window && @@ -1342,6 +1339,34 @@ return FALSE; } + if (event->type != GDK_BUTTON_PRESS) + { + /* In case of double click, we can propagate directly */ + + if (priv->click_timeout) + { + g_source_remove (priv->click_timeout); + priv->click_timeout = 0; + + /* First propagate the pending button press */ + hildon_desktop_home_item_propagate_button (item, + TRUE, + FALSE); + } + + gdk_event_free ((GdkEvent *)priv->last_click_event); + + /* ... then propagate the double-click */ + priv->last_click_event = + (GdkEventButton *)gdk_event_copy ((GdkEvent *)event); + hildon_desktop_home_item_propagate_button (item, + TRUE, + FALSE); + + /* The button release will be propagated in the button release handler */ + return TRUE; + } + /* Check if we clicked the close button */ if (event->window == priv->close_button_window) { @@ -1358,7 +1383,7 @@ if (event->window == priv->resize_handle_window) { - hildon_desktop_home_item_set_state (HILDON_DESKTOP_HOME_ITEM (w), + hildon_desktop_home_item_set_state (item, HILDON_DESKTOP_HOME_ITEM_STATE_RESIZING, event); }
- Previous message: [maemo-commits] r13773 - projects/haf/branches/osso-gnomevfs-extra
- Next message: [maemo-commits] r13775 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]