[maemo-commits] [maemo-commits] r11658 - in projects/haf/trunk/hildon-desktop: . libhildonwm src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue May 15 15:22:37 EEST 2007
- Previous message: [maemo-commits] r11657 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r11660 - projects/haf/tags/hildon-home-webshortcut/1:1.9.1-1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart Date: 2007-05-15 15:22:36 +0300 (Tue, 15 May 2007) New Revision: 11658 Added: projects/haf/trunk/hildon-desktop/src/hd-hung-app-handler.c Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c projects/haf/trunk/hildon-desktop/src/Makefile.am projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c Log: * src/hd-hung-app-handler.c: - Added missing "hung application" handler. * src/Makefile.am: updated * libhildonwm/hd-wm.c: - Handle home entry info from hd_wm_top_item * src/hd-switcher-menu.c: Close the menu when topping desktop. * ChangeLog updated. Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-05-15 12:15:40 UTC (rev 11657) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-05-15 12:22:36 UTC (rev 11658) @@ -1,5 +1,14 @@ -2007-05-13 Moises Martinez <moises.martinez at nokia.com> +2007-05-15 Moises Martinez <moises.martinez at nokia.com> + * src/hd-hung-app-handler.c: + - Added missing "hung application" handler. + * src/Makefile.am: updated + * libhildonwm/hd-wm.c: + - Handle home entry info from hd_wm_top_item + * src/hd-switcher-menu.c: Close the menu when topping desktop. + +2007-05-14 Moises Martinez <moises.martinez at nokia.com> + * src/hd-switcher-menu.c: - Fixed showing of menu button when notifications are added and there are no applications and the menu is closed afterwards. Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c 2007-05-15 12:15:40 UTC (rev 11657) +++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c 2007-05-15 12:22:36 UTC (rev 11658) @@ -1259,6 +1259,12 @@ gdk_error_trap_pop(); } + + if (info->type == HD_ENTRY_DESKTOP) + { + hd_wm_top_desktop (); + g_signal_emit_by_name (hdwm, "entry_info_stack_changed", info); + } else g_debug ("### Invalid window type ###\n"); } @@ -1785,13 +1791,10 @@ * deactivate any active buttons. */ - HDEntryInfo * info = NULL; - /* = hn_app_switcher_get_home_entry_info (hdwm->priv->app_switcher);*/ + HDEntryInfo * info = hdwm->priv->home_info; if (info) g_signal_emit_by_name (hdwm,"entry_info_stack_changed",info); - else - g_debug ("***************** No Home info yet"); } out: Modified: projects/haf/trunk/hildon-desktop/src/Makefile.am =================================================================== --- projects/haf/trunk/hildon-desktop/src/Makefile.am 2007-05-15 12:15:40 UTC (rev 11657) +++ projects/haf/trunk/hildon-desktop/src/Makefile.am 2007-05-15 12:22:36 UTC (rev 11658) @@ -4,8 +4,11 @@ pkginclude_HEADERS = hd-plugin-loader.h \ hd-config.h -bin_PROGRAMS = hildon-desktop +bin_PROGRAMS = hd-hung-app-handler hildon-desktop +hd_hung_app_handler_SOURCES = hd-hung-app-handler.c +hd_hung_app_handler_LDADD = $(XLIBS_LIBS) + hildon_desktop_CPPFLAGS = \ $(HILDON_CFLAGS) \ $(HILDON_FM_CFLAGS) \ Added: projects/haf/trunk/hildon-desktop/src/hd-hung-app-handler.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hd-hung-app-handler.c 2007-05-15 12:15:40 UTC (rev 11657) +++ projects/haf/trunk/hildon-desktop/src/hd-hung-app-handler.c 2007-05-15 12:22:36 UTC (rev 11658) @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2006 Nokia Corporation. All rights reserved. + * + * Contact: karoliina.t.salminen at nokia.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xatom.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int +main(int argc, char* argv[]) +{ + Display *xdpy; + XEvent xev; + Atom atom_hildon_frozen_app; + Window xwin_hung; + + if (argc < 3) + exit(1); + + xdpy = XOpenDisplay(getenv("DISPLAY")); + + if (xdpy == NULL) + exit(1); + + xwin_hung = (Window)strtol(argv[2], NULL, 10); + + atom_hildon_frozen_app = XInternAtom(xdpy, "_HILDON_FROZEN_WINDOW", False); + + memset(&xev, '\0', sizeof xev); + xev.xclient.type = ClientMessage; + xev.xclient.window = DefaultRootWindow(xdpy); + xev.xclient.message_type = atom_hildon_frozen_app; + xev.xclient.format = 8; + xev.xclient.data.l[0] = xwin_hung; /* Window ID */ + xev.xclient.data.l[1] = 0; /* detail - hung / unhung */ + + if (argc > 3 && !strcmp(argv[3], "1")) + xev.xclient.data.l[1] = 1; + + /* Send with prop mask as to lessen wake up of TN on other + * root msg's. + */ + XSendEvent(xdpy, DefaultRootWindow(xdpy) ,False, + PropertyChangeMask, + /* SubstructureRedirectMask|SubstructureNotifyMask, */ + &xev); + + XSync(xdpy, False); + + XCloseDisplay(xdpy); + + return 0; +} Modified: projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c 2007-05-15 12:15:40 UTC (rev 11657) +++ projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c 2007-05-15 12:22:36 UTC (rev 11658) @@ -599,6 +599,11 @@ hildon_desktop_popup_menu_add_item (switcher->priv->menu_applications, GTK_MENU_ITEM (menu_item)); + g_signal_connect_after (menu_item, + "activate", + G_CALLBACK (hd_switcher_menu_item_activated), + (gpointer)switcher); + hildon_desktop_popup_menu_add_item (switcher->priv->menu_applications, GTK_MENU_ITEM (gtk_separator_menu_item_new ()));
- Previous message: [maemo-commits] r11657 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r11660 - projects/haf/tags/hildon-home-webshortcut/1:1.9.1-1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]