[maemo-commits] [maemo-commits] r8271 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop libhildonwm test
From: moimart at stage.maemo.org moimart at stage.maemo.orgDate: Wed Nov 22 19:39:25 EET 2006
- Previous message: [maemo-commits] r8262 - projects/connectivity/osso-bluez-compat/tags
- Next message: [maemo-commits] r8272 - projects/haf/trunk/python-osso
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart
Date: 2006-11-22 19:39:22 +0200 (Wed, 22 Nov 2006)
New Revision: 8271
Added:
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/Makefile.am
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/libhildonwm.pc.in
projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c
Modified:
projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
projects/haf/branches/maemo-af-desktop/hildon-desktop/Makefile.am
projects/haf/branches/maemo-af-desktop/hildon-desktop/configure.ac
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/statusbar-item-wrapper.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-keys.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-memory.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/osso-manager.h
projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test1.c
Log:
* libhildonwm/*: Added libhildonwm to building system. Now it builds
but lacks of application switcher support (needs refactoring API for
that)
* test/test4.c: Created test-program for testing libhildonwm.
* ChangeLog updated.
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2006-11-22 17:39:22 UTC (rev 8271)
@@ -1,3 +1,10 @@
+2006-11-22 Moises Martinez <moises.martinzes at nokia.com>
+
+ * libhildonwm/*: Added libhildonwm to building system. Now it builds
+ but lacks of application switcher support (needs refactoring API for
+ that)
+ * test/test4.c: Created test-program for testing libhildonwm.
+
2006-11-22 Lucas Rocha <lucas.rocha at nokia.com>
* configure.ac, Makefile.am, data/desktop.conf, data/tasknavigator.conf,
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/Makefile.am
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/Makefile.am 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/Makefile.am 2006-11-22 17:39:22 UTC (rev 8271)
@@ -1 +1 @@
-SUBDIRS = data libhildondesktop src
+SUBDIRS = data libhildonwm libhildondesktop src
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/configure.ac
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/configure.ac 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/configure.ac 2006-11-22 17:39:22 UTC (rev 8271)
@@ -144,6 +144,8 @@
AC_OUTPUT(Makefile \
+ libhildonwm/Makefile \
+ libhildonwm/libhildonwm.pc \
libhildondesktop/Makefile \
libhildondesktop/libhildondesktop.pc \
data/Makefile \
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/statusbar-item-wrapper.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/statusbar-item-wrapper.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/statusbar-item-wrapper.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -231,7 +231,7 @@
if (!priv->dlhandle)
{
- g_debug ("SBW: I can't open %s", priv->library);
+ g_debug ("SBW: I can't open %s %s", priv->library, dlerror());
gtk_object_sink (GTK_OBJECT (self)); /* FIXME: This or unref? */
return self; /* FIXME: NULL or self? */
}
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/Makefile.am
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/Makefile.am 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/Makefile.am 2006-11-22 17:39:22 UTC (rev 8271)
@@ -0,0 +1,46 @@
+# Copyright (c) 2006 Nokia Corporation
+# SUBDIRS = po
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgincludedir = $(includedir)/libhildonwm/libhildonwm
+pkgconfig_DATA = libhildonwm.pc
+pkginclude_HEADERS = hd-wm.h hd-wm-types.h
+
+
+EXTRA_DIST = .empty
+
+INCLUDES = \
+ $(HILDON_CFLAGS) \
+ $(GCONF_CFLAGS) \
+ $(GNOME_VFS_CFLAGS) \
+ $(OSSO_CFLAGS) \
+ $(LIBXML_CFLAGS) \
+ $(XLIBS_CFLAGS) \
+ $(XTEST_CFLAGS) \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -DDESKTOPENTRYDIR=\"$(hildondesktopentrydir)\"
+
+lib_LTLIBRARIES = libhildonwm.la
+
+libhildonwm_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ hd-wm.c \
+ hd-wm-util.c \
+ hd-wm-memory.c \
+ hd-keys.c \
+ hd-wm-watched-window.c \
+ hd-wm-watched-window-view.c \
+ hd-wm-watchable-app.c \
+ hd-entry-info.c \
+ osso-manager.c
+
+libhildonwm_la_LIBADD = \
+ $(OSSO_LIBS) \
+ $(HILDON_LIBS) \
+ $(HILDONBASELIB_LIBS) \
+ $(GCONF_LIBS) \
+ $(GNOME_VFS_LIBS) \
+ $(XLIBS_LIBS) \
+ $(XTEST_LIBS)
+
+CLEANFILES = *~
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-keys.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-keys.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-keys.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -66,7 +66,7 @@
hd_keys_action_close (HDKeysConfig *keys,
gpointer *user_data)
{
- HNWMWatchedWindow * win = hd_wm_get_active_window();
+ HDWMWatchedWindow * win = hd_wm_get_active_window();
if (win)
{
@@ -83,7 +83,7 @@
gpointer *user_data)
{
/* Get topped app, call XIconise on its win */
- HNWMWatchedWindow * win = hd_wm_get_active_window();
+ HDWMWatchedWindow * win = hd_wm_get_active_window();
if (win)
{
@@ -149,25 +149,25 @@
}
HDKeysActionConfLookup[] =
{
- { HN_KEYS_GCONF_PATH "/window_close", HN_KEY_ACTION_CLOSE,
+ { HD_KEYS_GCONF_PATH "/window_close", HD_KEY_ACTION_CLOSE,
hd_keys_action_close, NULL},
- { HN_KEYS_GCONF_PATH "/window_minimize", HN_KEY_ACTION_MINIMIZE ,
+ { HD_KEYS_GCONF_PATH "/window_minimize", HD_KEY_ACTION_MINIMIZE ,
hd_keys_action_minimize, NULL},
- { HN_KEYS_GCONF_PATH "/task_switcher", HN_KEY_ACTION_TASK_SWITCHER,
- hd_keys_action_tn_activate, GINT_TO_POINTER (HN_TN_ACTIVATE_MAIN_MENU) },
- { HN_KEYS_GCONF_PATH "/task_launcher", HN_KEY_ACTION_TASK_LAUNCHER,
- hd_keys_action_tn_activate, GINT_TO_POINTER (HN_TN_ACTIVATE_OTHERS_MENU)},
- { HN_KEYS_GCONF_PATH "/power", HN_KEY_ACTION_POWER,
+ { HD_KEYS_GCONF_PATH "/task_switcher", HD_KEY_ACTION_TASK_SWITCHER,
+ hd_keys_action_tn_activate, GINT_TO_POINTER (0) }, /* AS MENU */
+ { HD_KEYS_GCONF_PATH "/task_launcher", HD_KEY_ACTION_TASK_LAUNCHER,
+ hd_keys_action_tn_activate, GINT_TO_POINTER (0)}, /* OTHERS MENU */
+ { HD_KEYS_GCONF_PATH "/power", HD_KEY_ACTION_POWER,
hd_keys_action_power, GINT_TO_POINTER(FALSE) },
- { HN_KEYS_GCONF_PATH "/home", HN_KEY_ACTION_HOME,
+ { HD_KEYS_GCONF_PATH "/home", HD_KEY_ACTION_HOME,
hd_keys_action_home, NULL },
- { HN_KEYS_GCONF_PATH "/menu", HN_KEY_ACTION_MENU,
+ { HD_KEYS_GCONF_PATH "/menu", HD_KEY_ACTION_MENU,
hd_keys_action_send_key, (gpointer)XK_F4 },
- { HN_KEYS_GCONF_PATH "/fullscreen", HN_KEY_ACTION_FULLSCREEN,
+ { HD_KEYS_GCONF_PATH "/fullscreen", HD_KEY_ACTION_FULLSCREEN,
hd_keys_action_send_key, (gpointer)XK_F6 },
- { HN_KEYS_GCONF_PATH "/zoom_in", HN_KEY_ACTION_ZOOM_IN,
+ { HD_KEYS_GCONF_PATH "/zoom_in", HD_KEY_ACTION_ZOOM_IN,
hd_keys_action_send_key, (gpointer)XK_F7 },
- { HN_KEYS_GCONF_PATH "/zoom_out", HN_KEY_ACTION_ZOOM_OUT,
+ { HD_KEYS_GCONF_PATH "/zoom_out", HD_KEY_ACTION_ZOOM_OUT,
hd_keys_action_send_key, (gpointer)XK_F8 },
{ NULL, 0, NULL, NULL }
};
@@ -420,7 +420,7 @@
/* If F5 is assigned to "Home", don't do anything or we will be
* conflicting with MCE's handling of the key */
if (ks == XK_F5 &&
- HDKeysActionConfLookup[conf_index].action == HN_KEY_ACTION_HOME)
+ HDKeysActionConfLookup[conf_index].action == HD_KEY_ACTION_HOME)
return NULL;
/* If we grab keycode 0, we end up grabbing the entire keyboard :\ */
@@ -628,12 +628,12 @@
keys->gconf_client = gconf_client_get_default();
gconf_client_add_dir (keys->gconf_client,
- HN_KEYS_GCONF_PATH,
+ HD_KEYS_GCONF_PATH,
GCONF_CLIENT_PRELOAD_NONE,
NULL);
gconf_client_notify_add (keys->gconf_client,
- HN_KEYS_GCONF_PATH,
+ HD_KEYS_GCONF_PATH,
gconf_key_changed_callback,
keys,
NULL,
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-memory.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-memory.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-memory.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -81,7 +81,7 @@
typedef struct
{
gboolean only_able_to_hibernate;
- HNWMWatchableApp * top_app;
+ HDWMWatchableApp * top_app;
} _memory_foreach_data;
@@ -90,14 +90,14 @@
gpointer value,
gpointer userdata)
{
- HNWMWatchableApp * app;
- HNWMWatchedWindow * win;
+ HDWMWatchableApp * app;
+ HDWMWatchedWindow * win;
_memory_foreach_data * d;
HN_DBG("### enter ###");
d = (_memory_foreach_data*) userdata;
- win = (HNWMWatchedWindow *)value;
+ win = (HDWMWatchedWindow *)value;
app = hd_wm_watched_window_get_app(win);
if (d->only_able_to_hibernate)
@@ -148,7 +148,7 @@
hd_wm_memory_kill_all_watched (gboolean only_kill_able_to_hibernate)
{
_memory_foreach_data d;
- HNWMWatchedWindow * top_win = NULL;
+ HDWMWatchedWindow * top_win = NULL;
Window * top_xwin;
/* init the foreach data */
@@ -163,7 +163,7 @@
*/
top_xwin
= hd_wm_util_get_win_prop_data_and_validate (GDK_ROOT_WINDOW(),
- hd_wm_get_atom(HN_ATOM_MB_CURRENT_APP_WINDOW),
+ hd_wm_get_atom(HD_ATOM_MB_CURRENT_APP_WINDOW),
XA_WINDOW,
32,
0,
@@ -200,9 +200,10 @@
void /* NOTE: callback from app switcher */
hd_wm_memory_bgkill_func(gboolean is_on)
{
- if (!config_do_bgkill) /* NOTE: var extern in hildon-navigator-main.h */
+#if 0
+ if (!config_do_bgkill) /* NOTE: var extern in hildon-navigator-main.h */
return;
-
+#endif
hd_wm_set_bg_kill_situation(is_on);
if (is_on == TRUE)
@@ -226,6 +227,7 @@
hd_wm_memory_update_lowmem_ui(is_on);
/* NOTE: config_lowmem_notify_enter extern in hildon-navigator-main.h */
+#if 0
if (is_on && config_lowmem_notify_enter)
{
/* NOTE: again in hildon-navigator-main.h
@@ -235,6 +237,7 @@
}
*/
}
+#endif
}
}
@@ -247,9 +250,10 @@
{
/* If dimming is disabled, we don't do anything here. Also see
APPLICATION_SWITCHER_UPDATE_LOWMEM_SITUATION. */
+#if 0
if (!config_lowmem_dim)
return;
-
+#endif
g_debug ("We have to set sensitiveness of others menu here!");
/*
gtk_widget_set_sensitive(hn_window_get_others_menu(tasknav),!lowmem);
@@ -286,14 +290,14 @@
if (menu_comp.wm_class != NULL)
{
- HNWMWatchedWindow *win = NULL;
+ HDWMWatchedWindow *win = NULL;
win = hd_wm_lookup_watched_window_via_service (menu_comp.wm_class);
if (win)
{
- HNWMWatchableApp *app;
+ HDWMWatchableApp *app;
app = hd_wm_watched_window_get_app (win);
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -0,0 +1,215 @@
+/*
+ * This file is part of maemo-af-desktop
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation.
+ *
+ * Contact: Karoliina Salminen <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 <stdlib.h>
+#include <string.h>
+#include <gdk/gdkx.h>
+
+#include "hd-wm-util.h"
+
+#define BUF_SIZE 80
+
+gulong
+hd_wm_util_getenv_long (gchar *env_str, gulong val_default)
+{
+ gchar *val_str;
+ gulong val;
+
+ if ((val_str = getenv(env_str)) != NULL)
+ val = strtoul(val_str, NULL, 10);
+ else
+ val = val_default;
+
+ return val;
+}
+
+void*
+hd_wm_util_get_win_prop_data_and_validate (Window xwin,
+ Atom prop,
+ Atom type,
+ int expected_format,
+ int expected_n_items,
+ int *n_items_ret)
+{
+ Atom type_ret;
+ int format_ret;
+ unsigned long items_ret;
+ unsigned long after_ret;
+ unsigned char *prop_data;
+ int status;
+
+ prop_data = NULL;
+
+ gdk_error_trap_push();
+
+ status = XGetWindowProperty (GDK_DISPLAY(),
+ xwin,
+ prop,
+ 0, G_MAXLONG,
+ False,
+ type,
+ &type_ret,
+ &format_ret,
+ &items_ret,
+ &after_ret,
+ &prop_data);
+
+
+ if (gdk_error_trap_pop() || status != Success || prop_data == NULL)
+ goto fail;
+
+ if (expected_format && format_ret != expected_format)
+ goto fail;
+
+ if (expected_n_items && items_ret != expected_n_items)
+ goto fail;
+
+ if (n_items_ret)
+ *n_items_ret = items_ret;
+
+ return prop_data;
+
+ fail:
+
+ if (prop_data)
+ XFree(prop_data);
+
+ return NULL;
+}
+
+gboolean
+hd_wm_util_send_x_message (Window xwin_src,
+ Window xwin_dest,
+ Atom delivery_atom,
+ long mask,
+ unsigned long data0,
+ unsigned long data1,
+ unsigned long data2,
+ unsigned long data3,
+ unsigned long data4)
+{
+ XEvent ev;
+
+ memset(&ev, 0, sizeof(ev));
+ ev.xclient.type = ClientMessage;
+
+ ev.xclient.window = xwin_src;
+ ev.xclient.message_type = delivery_atom;
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = data0;
+ ev.xclient.data.l[1] = data1;
+ ev.xclient.data.l[2] = data2;
+ ev.xclient.data.l[3] = data3;
+ ev.xclient.data.l[4] = data4;
+
+ gdk_error_trap_push();
+
+ XSendEvent(GDK_DISPLAY(), xwin_dest, mask, False, &ev);
+ XSync(GDK_DISPLAY(), FALSE);
+
+ if (gdk_error_trap_pop())
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* Function to retrieve the size of VmData for a process
+ * Returns -1 on failure
+ */
+gint hd_wm_get_vmdata_for_pid(gint pid)
+{
+ gchar *fname;
+ const gchar str[7] = "VmData";
+ gchar buf[BUF_SIZE];
+ int c;
+ gint i;
+ gboolean read = FALSE;
+ FILE *f;
+
+ fname = g_strdup_printf("/proc/%i/status", pid);
+ f = fopen(fname, "r");
+
+ if (f == NULL)
+ {
+ g_print("No process data available for %s\n", fname);
+ g_free (fname);
+ return -1;
+ }
+
+ g_free (fname);
+
+ do
+ {
+ c = fgetc(f);
+ if (c == EOF)
+ {
+ break;
+ }
+ /* Match incrementally until we find the string "VmData" */
+ for (i = 0; i < 6; i++)
+ {
+ if (c != str[i])
+ {
+ break;
+ }
+ c = fgetc(f);
+ if (i == 5)
+ {
+ read = TRUE;
+ break;
+ }
+ }
+ if (read == TRUE)
+ {
+ /* Skip extra chars */
+ while (c != 32 && c != EOF && c != '\n')
+ {
+ c = fgetc(f);
+ }
+ /* Skip whitespace */
+ while (c == 32 && c != EOF && c != '\n')
+ {
+ c = fgetc(f);
+ }
+
+ /* Read the number */
+ i = 0;
+ while (c != 32 && c != EOF && c != '\n' && i < BUF_SIZE)
+ {
+ buf[i] = c;
+ i++;
+ c = fgetc(f);
+ }
+ fclose (f);
+ return (atoi(buf));
+ break;
+ }
+
+ } while (c != EOF);
+
+ /* Failed, return -1 */
+
+ return -1;
+}
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.h 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-util.h 2006-11-22 17:39:22 UTC (rev 8271)
@@ -0,0 +1,57 @@
+/*
+ * This file is part of maemo-af-desktop
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation.
+ *
+ * Contact: Karoliina Salminen <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
+ *
+ */
+
+/**
+* @file windowmanager.h
+*/
+
+#ifndef __HN_WM_UTILS_H__
+#define __HN_WM_UTILS_H__
+
+#include "hd-wm.h"
+
+gulong
+hd_wm_util_getenv_long (gchar *env_str, gulong val_default);
+
+void*
+hd_wm_util_get_win_prop_data_and_validate (Window xwin,
+ Atom prop,
+ Atom type,
+ int expected_format,
+ int expected_n_items,
+ int *n_items_ret);
+
+gboolean
+hd_wm_util_send_x_message (Window xwin_src,
+ Window xwin_dest,
+ Atom delivery_atom,
+ long mask,
+ unsigned long data0,
+ unsigned long data1,
+ unsigned long data2,
+ unsigned long data3,
+ unsigned long data4);
+
+gint hd_wm_get_vmdata_for_pid(gint pid);
+
+#endif
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -31,13 +31,15 @@
#include <hildon-widgets/hildon-banner.h>
#include <hildon-widgets/hildon-note.h>
+#define gettext(o) o
+#define dgettext(o,e) o
+#define _(o) o
+
#include "hd-wm.h"
#include "hd-wm-watchable-app.h"
#include "hd-wm-watched-window.h"
#include "hd-entry-info.h"
-#include "hd-app-switcher.h"
#include "osso-manager.h"
-#include "hildon-navigator.h"
typedef char HDWMWatchableAppFlags;
@@ -84,7 +86,7 @@
GtkWidget *ping_timeout_note; /* The note that is shown when the app quits responding */
HDWMWatchedWindow *active_window;
HDWMWatchableAppFlags flags;
- HNEntryInfo *info;
+ HDEntryInfo *info;
};
@@ -501,7 +503,7 @@
g_free(app->text_domain);
if (app->info)
- hn_entry_info_free (app->info);
+ hd_entry_info_free (app->info);
g_free(app);
}
@@ -673,11 +675,11 @@
HDWM_APP_UNSET_FLAG(app, HDWM_APP_LAUNCHING);
}
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watchable_app_get_info (HDWMWatchableApp *app)
{
if (!app->info)
- app->info = hn_entry_info_new_from_app (app);
+ app->info = hd_entry_info_new_from_app (app);
return app->info;
}
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watchable-app.h 2006-11-22 17:39:22 UTC (rev 8271)
@@ -284,7 +284,7 @@
hd_wm_watchable_app_set_launching (HDWMWatchableApp *app,
gboolean launching);
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watchable_app_get_info (HDWMWatchableApp *app);
#if 0
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -26,7 +26,6 @@
#include "hd-wm-watched-window.h"
#include "hd-wm-watchable-app.h"
#include "hd-entry-info.h"
-#include "hn-app-switcher.h"
/* Watched Window views */
@@ -131,7 +130,7 @@
/*
hn_app_switcher_remove (hd_wm_get_app_switcher (), view->info);
*/
- hn_entry_info_free (view->info);
+ hd_entry_info_free (view->info);
g_free (view);
}
@@ -145,23 +144,23 @@
void
hd_wm_watched_window_view_set_info (HDWMWatchedWindowView *view,
- HNEntryInfo *info)
+ HDEntryInfo *info)
{
g_return_if_fail (view);
if (view->info)
- hn_entry_info_free (view->info);
+ hd_entry_info_free (view->info);
view->info = info;
}
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watched_window_view_get_info (HDWMWatchedWindowView *view)
{
g_return_val_if_fail (view != NULL, NULL);
if (!view->info)
- view->info = hn_entry_info_new_from_view (view);
+ view->info = hd_entry_info_new_from_view (view);
return view->info;
}
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window-view.h 2006-11-22 17:39:22 UTC (rev 8271)
@@ -57,9 +57,9 @@
void
hd_wm_watched_window_view_set_info (HDWMWatchedWindowView *view,
- HNEntryInfo *info);
+ HDEntryInfo *info);
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watched_window_view_get_info (HDWMWatchedWindowView *view);
gboolean
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -34,14 +34,14 @@
#include <hildon-widgets/hildon-defines.h>
#include <hildon-widgets/hildon-banner.h>
#include <hildon-widgets/hildon-note.h>
-#include "hildon-navigator-window.h"
#include "hd-wm-watched-window.h"
#include "hd-wm-watched-window-view.h"
#include "hd-wm-watchable-app.h"
#include "hd-entry-info.h"
-#include "hd-app-switcher.h"
#include "osso-manager.h"
+#define _(o) o
+
#define PING_TIMEOUT_MESSAGE_STRING _( "qgn_nc_apkil_notresponding" )
#define PING_TIMEOUT_RESPONSE_STRING _( "qgn_ib_apkil_responded" )
#define PING_TIMEOUT_KILL_FAILURE_STRING _( "" )
@@ -51,12 +51,7 @@
#define HIBERNATION_TIMEMOUT 3000 /* as suggested by 31410#10 */
-extern HildonNavigatorWindow *tasknav;
-/*
-extern Navigator * task_nav;
-extern Navigator * task_nav;
-*/
typedef char HDWMWatchedWindowFlags;
typedef enum
@@ -98,7 +93,7 @@
Window xwin_group;
gchar *hibernation_key;
HDWMWatchedWindowFlags flags;
- HNEntryInfo *info;
+ HDEntryInfo *info;
GdkWindow *gdk_wrapper_win;
};
@@ -146,13 +141,13 @@
gulong *data;
gint len = 0, offset, w, h, i;
guchar *rgba_data, *p;
- HNEntryInfo *info;
+ HDEntryInfo *info;
rgba_data = p = NULL;
data = hd_wm_util_get_win_prop_data_and_validate
(hd_wm_watched_window_get_x_win (win),
- hd_wm_get_atom(HN_ATOM_NET_WM_ICON),
+ hd_wm_get_atom(HD_ATOM_NET_WM_ICON),
XA_CARDINAL,
0,
0,
@@ -253,7 +248,7 @@
new_active_view_id = hd_wm_util_get_win_prop_data_and_validate
(hd_wm_watched_window_get_x_win (win),
- hd_wm_get_atom(HN_ATOM_HILDON_VIEW_ACTIVE),
+ hd_wm_get_atom(HD_ATOM_HILDON_VIEW_ACTIVE),
XA_WINDOW,
32,
0,
@@ -284,7 +279,7 @@
if (hd_wm_watched_window_view_get_id (view) == *new_active_view_id)
{
- HNEntryInfo *info;
+ HDEntryInfo *info;
info = hd_wm_watched_window_view_get_info (view);
hd_wm_watched_window_set_active_view (win, view);
@@ -319,8 +314,8 @@
/* Attempt to get UTF8 name */
win->name = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_NET_WM_NAME),
- hd_wm_get_atom(HN_ATOM_UTF8_STRING),
+ hd_wm_get_atom(HD_ATOM_NET_WM_NAME),
+ hd_wm_get_atom(HD_ATOM_UTF8_STRING),
8,
0,
&n_items);
@@ -342,7 +337,7 @@
win->subname = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_MB_WIN_SUB_NAME),
+ hd_wm_get_atom(HD_ATOM_MB_WIN_SUB_NAME),
XA_STRING,
8,
0,
@@ -395,7 +390,7 @@
*/
foo = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_HILDON_APP_KILLABLE),
+ hd_wm_get_atom(HD_ATOM_HILDON_APP_KILLABLE),
XA_STRING,
8,
0,
@@ -406,7 +401,7 @@
/*try the alias*/
foo = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_HILDON_ABLE_TO_HIBERNATE),
+ hd_wm_get_atom(HD_ATOM_HILDON_ABLE_TO_HIBERNATE),
XA_STRING,
8,
0,
@@ -429,8 +424,8 @@
state = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_WM_STATE),
- hd_wm_get_atom(HN_ATOM_WM_STATE),
+ hd_wm_get_atom(HD_ATOM_WM_STATE),
+ hd_wm_get_atom(HD_ATOM_WM_STATE),
0, /* FIXME: format */
0,
NULL);
@@ -485,10 +480,10 @@
if (need_icon_sync)
{
- HNEntryInfo *info = hd_wm_watched_window_peek_info (win);
+ HDEntryInfo *info = hd_wm_watched_window_peek_info (win);
if(info)
- hn_app_switcher_changed (hd_wm_get_app_switcher (), info);
+ g_debug ("%s: %d, hn_app_switcher_changed (hd_wm_get_app_switcher (), info); ",__FILE__,__LINE__);
}
XFree(wm_hints);
@@ -501,7 +496,7 @@
data = hd_wm_util_get_win_prop_data_and_validate
(hd_wm_watched_window_get_x_win (win),
- hd_wm_get_atom(HN_ATOM_NET_WM_USER_TIME),
+ hd_wm_get_atom(HD_ATOM_NET_WM_USER_TIME),
XA_CARDINAL,
0,
0,
@@ -527,14 +522,14 @@
struct xwinv xwins;
int i;
GList *iter = NULL, *next_iter;
- HNEntryInfo *info;
+ HDEntryInfo *info;
if (hd_wm_watched_window_is_hibernating(win))
return;
xwins.wins = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_HILDON_VIEW_LIST),
+ hd_wm_get_atom(HD_ATOM_HILDON_VIEW_LIST),
XA_WINDOW,
32,
0,
@@ -611,7 +606,7 @@
HN_DBG("adding view info to AS");
info = hd_wm_watched_window_view_get_info (new_view);
- hn_app_switcher_add (hd_wm_get_app_switcher (), info);
+ g_debug ("%s: %d,hn_app_switcher_add (hd_wm_get_app_switcher (), info);",__FILE__,__LINE__);
/* The window may have been 'viewless' before this
* view was created to we need to remove the widget
@@ -620,9 +615,9 @@
if (hd_wm_watched_window_peek_info (win))
{
HN_DBG("adding first view; removing window info from AS");
-
- hn_app_switcher_remove(hd_wm_get_app_switcher (),
- hd_wm_watched_window_peek_info (win));
+
+ g_debug ("%s: %d, hn_app_switcher_remove(hd_wm_get_app_switcher (),hd_wm_watched_window_peek_info (win));",
+ __FILE__,__LINE__);
/*
* since the window of multiviewed app does not figure in the AS,
@@ -671,7 +666,7 @@
if (win_found)
{
- HNEntryInfo *info = NULL;
+ HDEntryInfo *info = NULL;
HN_DBG("New Window is from hibernation");
@@ -710,7 +705,7 @@
info = hd_wm_watched_window_peek_info (win);
if (info)
- hn_app_switcher_changed_stack (hd_wm_get_app_switcher(), info);
+ g_debug ("%s: %d, hn_app_switcher_changed_stack (hd_wm_get_app_switcher(), info);",__FILE__,__LINE__);
}
else
win = g_new0 (HDWMWatchedWindow, 1);
@@ -924,7 +919,7 @@
pid_result = hd_wm_util_get_win_prop_data_and_validate
(win->xwin,
- hd_wm_get_atom(HN_ATOM_NET_WM_PID),
+ hd_wm_get_atom(HD_ATOM_NET_WM_PID),
XA_CARDINAL,
32,
0,
@@ -1043,9 +1038,8 @@
{
/* only windows of multiwindow apps have their own info */
HN_DBG("a window of multiwindow application; removing info from AS");
- hn_app_switcher_remove(hd_wm_get_app_switcher(),
- win->info);
- hn_entry_info_free (win->info);
+ g_debug ("%s: %d, hn_app_switcher_remove(hd_wm_get_app_switcher(), win->info);",__FILE__,__LINE__);
+ hd_entry_info_free (win->info);
win->info = NULL;
}
@@ -1259,10 +1253,11 @@
ev.xclient.type = ClientMessage;
ev.xclient.window = hd_wm_watched_window_get_x_win (win);
- ev.xclient.message_type = hd_wm_get_atom(HN_ATOM_NET_CLOSE_WINDOW);
+ ev.xclient.message_type = hd_wm_get_atom(HD_ATOM_NET_CLOSE_WINDOW);
ev.xclient.format = 32;
ev.xclient.data.l[0] = CurrentTime;
- ev.xclient.data.l[1] = GDK_WINDOW_XID(gtk_widget_get_parent_window (GTK_WIDGET (tasknav)));
+ ev.xclient.data.l[1] = GDK_WINDOW_XID(gdk_get_default_root_window ());
+ /*ev.xclient.data.l[1] = GDK_WINDOW_XID(gtk_widget_get_parent_window (GTK_WIDGET (tasknav)));*/
gdk_error_trap_push();
XSendEvent(GDK_DISPLAY(), GDK_ROOT_WINDOW(), False,
@@ -1330,21 +1325,21 @@
void
hd_wm_watched_window_set_info (HDWMWatchedWindow *win,
- HNEntryInfo *info)
+ HDEntryInfo *info)
{
if (win->info)
- hn_entry_info_free (win->info);
+ hd_entry_info_free (win->info);
win->info = info;
}
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watched_window_peek_info (HDWMWatchedWindow *win)
{
return win->info;
}
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watched_window_create_new_info (HDWMWatchedWindow *win)
{
if(win->info)
@@ -1357,7 +1352,7 @@
}
else
{
- win->info = hn_entry_info_new_from_window (win);
+ win->info = hd_entry_info_new_from_window (win);
}
return win->info;
@@ -1368,7 +1363,7 @@
{
if(win->info)
{
- hn_entry_info_free (win->info);
+ hd_entry_info_free (win->info);
win->info = NULL;
}
}
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm-watched-window.h 2006-11-22 17:39:22 UTC (rev 8271)
@@ -152,10 +152,10 @@
hd_wm_watched_window_set_info (HDWMWatchedWindow *win,
HDEntryInfo *info);
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watched_window_peek_info (HDWMWatchedWindow *win);
-HNEntryInfo *
+HDEntryInfo *
hd_wm_watched_window_create_new_info (HDWMWatchedWindow *win);
void
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -46,17 +46,14 @@
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
-#include "hn-wm.h"
-#include "hn-wm-watched-window.h"
-#include "hn-wm-watchable-app.h"
-#include "hn-wm-watched-window-view.h"
-#include "hn-wm-memory.h"
-#include "hn-entry-info.h"
-#include "hn-app-switcher.h"
+#include "hd-wm.h"
+#include "hd-wm-watched-window.h"
+#include "hd-wm-watchable-app.h"
+#include "hd-wm-watched-window-view.h"
+#include "hd-wm-memory.h"
+#include "hd-entry-info.h"
#include "osso-manager.h"
-#include "hildon-navigator-window.h"
-#include "close-application-dialog.h"
-#include "hn-keys.h"
+#include "hd-keys.h"
#define SAVE_METHOD "save"
#define KILL_APPS_METHOD "kill_app"
@@ -99,7 +96,7 @@
struct HDWM /* Our main struct */
{
- Atom atoms[HN_ATOM_COUNT];
+ Atom atoms[HD_ATOM_COUNT];
/* WatchedWindows is a hash of watched windows hashed via in X window ID.
* As most lookups happen via window ID's makes sense to hash on this,
@@ -133,8 +130,8 @@
GList *banner_stack;
/* Key bindings and shortcuts */
- HNKeysConfig *keys;
- HNKeyShortcut *shortcut;
+ HDKeysConfig *keys;
+ HDKeyShortcut *shortcut;
gulong power_key_timeout;
/* FIXME: Below memory management related not 100% sure what they do */
@@ -159,7 +156,7 @@
void
-hd_wm_top_item (HNEntryInfo *info)
+hd_wm_top_item (HDEntryInfo *info)
{
HDWMWatchedWindow *win = NULL;
HDWMWatchableApp *app;
@@ -167,37 +164,37 @@
hd_wm_reset_focus();
- if (info->type == HN_ENTRY_WATCHED_APP)
+ if (info->type == HD_ENTRY_WATCHED_APP)
{
- app = hn_entry_info_get_app (info);
+ app = hd_entry_info_get_app (info);
- HN_DBG ("Found app: '%s'",
+ g_debug ("Found app: '%s'",
hd_wm_watchable_app_get_name (app));
hd_wm_top_service (hd_wm_watchable_app_get_service (app));
return;
}
- if (info->type == HN_ENTRY_WATCHED_VIEW)
+ if (info->type == HD_ENTRY_WATCHED_VIEW)
{
- HDWMWatchedWindowView *view = hn_entry_info_get_view (info);
+ HDWMWatchedWindowView *view = hd_entry_info_get_view (info);
win = hd_wm_watched_window_view_get_parent (view);
app = hd_wm_watched_window_get_app (win);
single_view = (hd_wm_watched_window_get_n_views(win) == 1);
if (app && hd_wm_watchable_app_is_hibernating(app))
{
- HN_DBG ("Window hibernating, calling hd_wm_top_service\n");
+ g_debug ("Window hibernating, calling hd_wm_top_service\n");
hd_wm_watched_window_set_active_view(win, view);
hd_wm_top_service (hd_wm_watchable_app_get_service (app));
return;
}
- HN_DBG ("Sending hildon activate message\n");
+ g_debug ("Sending hildon activate message\n");
hd_wm_util_send_x_message (hd_wm_watched_window_view_get_id (view),
hd_wm_watched_window_get_x_win (win),
- hdwm.atoms[HN_ATOM_HILDON_VIEW_ACTIVE],
+ hdwm.atoms[HD_ATOM_HILDON_VIEW_ACTIVE],
SubstructureRedirectMask | SubstructureNotifyMask,
0,
0,
@@ -209,21 +206,21 @@
return;
}
- if (info->type == HN_ENTRY_WATCHED_WINDOW || single_view)
+ if (info->type == HD_ENTRY_WATCHED_WINDOW || single_view)
{
XEvent ev;
- win = hn_entry_info_get_window (info);
+ win = hd_entry_info_get_window (info);
app = hd_wm_watched_window_get_app (win);
- HN_DBG ("Found window without views: '%s'\n",
+ g_debug ("Found window without views: '%s'\n",
hd_wm_watched_window_get_name (win));
if (app)
{
if (hd_wm_watched_window_is_hibernating (win))
{
- HN_DBG ("Window hibernating, calling hd_wm_top_service\n");
+ g_debug ("Window hibernating, calling hd_wm_top_service\n");
/* make sure we top the window user requested */
hd_wm_watchable_app_set_active_window(app, win);
@@ -233,7 +230,7 @@
}
}
- HN_DBG ("toping non view window (%li) via _NET_ACTIVE_WINDOW message",
+ g_debug ("toping non view window (%li) via _NET_ACTIVE_WINDOW message",
hd_wm_watched_window_get_x_win (win));
/* FIXME: hd_wm_util_send_x_message() should be used here but wont
@@ -243,7 +240,7 @@
ev.xclient.type = ClientMessage;
ev.xclient.window = hd_wm_watched_window_get_x_win (win);
- ev.xclient.message_type = hdwm.atoms[HN_ATOM_NET_ACTIVE_WINDOW];
+ ev.xclient.message_type = hdwm.atoms[HD_ATOM_NET_ACTIVE_WINDOW];
ev.xclient.format = 32;
gdk_error_trap_push ();
@@ -255,7 +252,7 @@
}
else
- HN_DBG ("### Invalid window type ###\n");
+ g_debug ("### Invalid window type ###\n");
}
gboolean
@@ -265,7 +262,7 @@
HDWMWatchedWindow *win;
guint pages_used = 0, pages_available = 0;
- HN_DBG(" Called with '%s'", service_name);
+ g_debug (" Called with '%s'", service_name);
if (service_name == NULL)
{
@@ -283,11 +280,11 @@
gboolean killed = TRUE;
if (win == NULL)
{
- killed = tn_close_application_dialog(CAD_ACTION_OPENING);
+ g_debug ("%s: %d, killed = tn_close_application_dialog(CAD_ACTION_OPENING);",__FILE__,__LINE__);
}
else if (hd_wm_watched_window_is_hibernating(win))
{
- killed = tn_close_application_dialog(CAD_ACTION_SWITCHING);
+ g_debug ("%s: %d, killed = tn_close_application_dialog(CAD_ACTION_SWITCHING);",__FILE__,__LINE__);
}
if (!killed)
@@ -299,7 +296,7 @@
/* Check how much memory we do have until the lowmem threshold */
if (!hd_wm_memory_get_limits (&pages_used, &pages_available))
- HN_DBG("### Failed to read memory limits, using scratchbox ??");
+ g_debug ("### Failed to read memory limits, using scratchbox ??");
/* Here we should compare the amount of pages to a configurable
* threshold. Value 0 means that we don't know and assume
@@ -314,11 +311,11 @@
gboolean killed = TRUE;
if (win == NULL)
{
- killed = tn_close_application_dialog(CAD_ACTION_OPENING);
+ g_debug ("%s: %d, killed = tn_close_application_dialog(CAD_ACTION_OPENING);",__FILE__,__LINE__);
}
else if (hd_wm_watched_window_is_hibernating(win))
{
- killed = tn_close_application_dialog(CAD_ACTION_SWITCHING);
+ g_debug ("%s: %d, killed = tn_close_application_dialog(CAD_ACTION_SWITCHING);",__FILE__,__LINE__);
}
if (!killed)
@@ -332,8 +329,8 @@
/* We dont have a watched window for this service currently
* so just launch it.
*/
- HN_DBG("unable to find service name '%s' in running wins", service_name);
- HN_DBG("Thus launcing via osso_manager_launch()");
+ g_debug ("unable to find service name '%s' in running wins", service_name);
+ g_debug ("Thus launcing via osso_manager_launch()");
osso_man = osso_manager_singleton_get_instance();
osso_manager_launch(osso_man, service_name, NULL);
return TRUE;
@@ -354,11 +351,11 @@
if (!view) /* There is no active so just grab the first one */
{
view = (HDWMWatchedWindowView *)((hd_wm_watched_window_get_views (win))->data);
- HN_DBG ("Window does not have active view !!!");
+ g_debug ("Window does not have active view !!!");
hd_wm_watched_window_set_active_view(win, view);
}
else
- HN_DBG ("Active view [%s]",
+ g_debug ("Active view [%s]",
hd_wm_watched_window_view_get_name(view));
}
@@ -369,7 +366,7 @@
HDWMWatchedWindow * active_win
= hd_wm_watchable_app_get_active_window(app);
- HN_DBG("app is hibernating, attempting to reawaken"
+ g_debug ("app is hibernating, attempting to reawaken"
"via osso_manager_launch()");
if (active_win)
@@ -390,20 +387,20 @@
we add a timeout allowing us to check the application started,
since we need to display a banner if it did not
*/
- HN_DBG("adding launch_timeout() callback");
+ g_debug ("adding launch_timeout() callback");
g_timeout_add( interval,
hd_wm_relaunch_timeout,
(gpointer) g_strdup(service_name));
return TRUE;
}
- HN_DBG("sending x message to activate app");
+ g_debug ("sending x message to activate app");
if (view)
{
hd_wm_util_send_x_message (hd_wm_watched_window_view_get_id (view),
hd_wm_watched_window_get_x_win (win),
- hdwm.atoms[HN_ATOM_HILDON_VIEW_ACTIVE],
+ hdwm.atoms[HD_ATOM_HILDON_VIEW_ACTIVE],
SubstructureRedirectMask
|SubstructureNotifyMask,
0,
@@ -420,12 +417,12 @@
memset(&ev, 0, sizeof(ev));
- HN_DBG("@@@@ Last active window %s\n",
+ g_debug ("@@@@ Last active window %s\n",
active_win ? hd_wm_watched_window_get_hibernation_key(active_win) : "none");
ev.xclient.type = ClientMessage;
ev.xclient.window = hd_wm_watched_window_get_x_win (active_win ? active_win : win);
- ev.xclient.message_type = hdwm.atoms[HN_ATOM_NET_ACTIVE_WINDOW];
+ ev.xclient.message_type = hdwm.atoms[HD_ATOM_NET_ACTIVE_WINDOW];
ev.xclient.format = 32;
gdk_error_trap_push();
@@ -446,8 +443,6 @@
return TRUE;
}
-#include "close-application-dialog.h"
-
void
hd_wm_toggle_desktop (void)
{
@@ -455,7 +450,7 @@
desktop_state = hd_wm_util_get_win_prop_data_and_validate (
GDK_WINDOW_XID(gdk_get_default_root_window()),
- hdwm.atoms[HN_ATOM_NET_SHOWING_DESKTOP],
+ hdwm.atoms[HD_ATOM_NET_SHOWING_DESKTOP],
XA_CARDINAL,
32,
1,
@@ -491,7 +486,7 @@
ev.xclient.type = ClientMessage;
ev.xclient.window = GDK_ROOT_WINDOW();
- ev.xclient.message_type = hdwm.atoms[HN_ATOM_NET_SHOWING_DESKTOP];
+ ev.xclient.message_type = hdwm.atoms[HD_ATOM_NET_SHOWING_DESKTOP];
ev.xclient.format = 32;
ev.xclient.data.l[0] = 1;
@@ -567,7 +562,7 @@
XInternAtoms (GDK_DISPLAY(),
atom_names,
- HN_ATOM_COUNT,
+ HD_ATOM_COUNT,
False,
hdwm.atoms);
}
@@ -601,7 +596,7 @@
*/
wm_type_atom
= hd_wm_util_get_win_prop_data_and_validate (xid,
- hdwm.atoms[HN_ATOM_NET_WM_WINDOW_TYPE],
+ hdwm.atoms[HD_ATOM_NET_WM_WINDOW_TYPE],
XA_ATOM,
32,
0,
@@ -628,8 +623,8 @@
}
/* Only care about desktop and app wins */
- if (wm_type_atom[0] != hdwm.atoms[HN_ATOM_NET_WM_WINDOW_TYPE_NORMAL]
- && wm_type_atom[0] != hdwm.atoms[HN_ATOM_NET_WM_WINDOW_TYPE_DESKTOP])
+ if (wm_type_atom[0] != hdwm.atoms[HD_ATOM_NET_WM_WINDOW_TYPE_NORMAL]
+ && wm_type_atom[0] != hdwm.atoms[HD_ATOM_NET_WM_WINDOW_TYPE_DESKTOP])
{
app = NULL;
XFree(wm_type_atom);
@@ -648,7 +643,7 @@
app = hd_wm_watchable_app_new_dummy ();
- HN_DBG(" ## Created dummy application for app without .desktop ##");
+ g_debug (" ## Created dummy application for app without .desktop ##");
}
@@ -866,7 +861,7 @@
if (!win)
{
- HN_DBG("checking WatchedWindowsHibernating hash, has %i items",
+ g_debug ("checking WatchedWindowsHibernating hash, has %i items",
g_hash_table_size (hdwm.watched_windows_hibernating));
win = g_hash_table_find ( hdwm.watched_windows_hibernating,
@@ -889,13 +884,13 @@
Window *app_xwin;
GList *views;
- HN_DBG ("called");
+ g_debug ("called");
if(hdwm.active_window)
previous_app_xwin = hd_wm_watched_window_get_x_win (hdwm.active_window);
app_xwin = hd_wm_util_get_win_prop_data_and_validate (GDK_ROOT_WINDOW(),
- hdwm.atoms[HN_ATOM_MB_CURRENT_APP_WINDOW],
+ hdwm.atoms[HD_ATOM_MB_CURRENT_APP_WINDOW],
XA_WINDOW,
32,
0,
@@ -932,8 +927,8 @@
for (l = views; l != NULL; l = l->next)
{
- HDWMWatchedWindowView *view = l->data;
- HNEntryInfo *info = hd_wm_watched_window_view_get_info (view);
+ /*HDWMWatchedWindowView *view = l->data;
+ HDEntryInfo *info = hd_wm_watched_window_view_get_info (view);*/
g_debug ("%s: %d, Here we notify changed stack to as",__FILE__,__LINE__);
/*
@@ -944,8 +939,8 @@
else
{
/* Window with no views */
- HN_DBG("Window 0x%x just became active", (int)win);
- HNEntryInfo *info = hd_wm_watched_window_peek_info (win);
+ g_debug ("Window 0x%x just became active", (int)win);
+ /*HDEntryInfo *info = hd_wm_watched_window_peek_info (win);*/
g_debug ("%s: %d, Here we notify changed stack to as",__FILE__,__LINE__);
/*
@@ -959,15 +954,15 @@
* gets minimised and the desktop is showing. We need to notify the AS to
* deactivate any active buttons.
*/
- /*
- HNEntryInfo * info
- = hn_app_switcher_get_home_entry_info (hdwm.app_switcher);
- */
+
+ HDEntryInfo * info = NULL;
+ /* = hn_app_switcher_get_home_entry_info (hdwm.app_switcher);*/
+
if (info)
/*hn_app_switcher_changed_stack (hdwm.app_switcher, info);*/
g_debug ("%s: %d, Here we try to get home entry and we notify changed stack to as",__FILE__,__LINE__);
else
- HN_DBG ("***************** No Home info yet");
+ g_debug ("***************** No Home info yet");
}
out:
@@ -1002,9 +997,9 @@
* windows hash
*/
HDWMWatchableApp * app;
- HNEntryInfo * app_info = NULL;
+ HDEntryInfo * app_info = NULL;
- HN_DBG ("hibernating window [%s], moving to hibernating hash",
+ g_debug ("hibernating window [%s], moving to hibernating hash",
hd_wm_watched_window_get_hibernation_key(win));
g_hash_table_insert (hd_wm_get_hibernating_windows(),
@@ -1066,7 +1061,7 @@
xwins.wins
= hd_wm_util_get_win_prop_data_and_validate (GDK_ROOT_WINDOW(),
- hdwm.atoms[HN_ATOM_MB_APP_WINDOW_LIST_STACKING],
+ hdwm.atoms[HD_ATOM_MB_APP_WINDOW_LIST_STACKING],
XA_WINDOW,
32,
0,
@@ -1121,7 +1116,7 @@
/* Grab the view prop from the window and add any views.
* Note this will add menu items for em.
*/
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_HILDON_VIEW_LIST);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_HILDON_VIEW_LIST);
if (hd_wm_watchable_app_is_dummy (app))
g_warning("Application %s did not provide valid .desktop file",
@@ -1129,7 +1124,7 @@
if (hd_wm_watched_window_get_n_views (win) == 0)
{
- HNEntryInfo *info;
+ HDEntryInfo *info;
HN_MARK();
@@ -1141,7 +1136,7 @@
if (!info)
{
info = hd_wm_watched_window_create_new_info (win);
- HN_DBG ("Adding AS entry for view-less window\n");
+ g_debug ("Adding AS entry for view-less window\n");
g_debug ("%s: %d, Here we add entry to as",__FILE__,__LINE__);
@@ -1226,7 +1221,7 @@
if(hdwm.has_focus)
{
- HN_DBG("Making TN unfocusable");
+ g_debug ("Making TN unfocusable");
hdwm.has_focus = FALSE;
g_debug ("%s: %d, set focus to tn to false",__FILE__,__LINE__);
/*hn_window_set_focus (tasknav,FALSE);*/
@@ -1252,11 +1247,11 @@
void
hd_wm_activate(guint32 what)
{
- GtkWidget * button = NULL;
+ /*GtkWidget * button = NULL;*/
g_debug ("received request %d", what);
- if (what >= (int) HN_TN_ACTIVATE_LAST)
+ if (what >= (int) HD_TN_ACTIVATE_LAST)
{
g_critical("Invalid value passed to hd_wm_activate()");
return;
@@ -1264,32 +1259,32 @@
switch (what)
{
- case HN_TN_ACTIVATE_KEY_FOCUS:
- HN_DBG("Making TN focusable");
+ case HD_TN_ACTIVATE_KEY_FOCUS:
+ g_debug ("Making TN focusable");
hdwm.has_focus = TRUE;
g_debug ("%s: %d, set focus to tn to true",__FILE__,__LINE__);
/*hn_window_set_focus (tasknav,TRUE);*/
return;
- case HN_TN_DEACTIVATE_KEY_FOCUS:
- HN_DBG("Making TN unfocusable");
+ case HD_TN_DEACTIVATE_KEY_FOCUS:
+ g_debug ("Making TN unfocusable");
hdwm.has_focus = FALSE;
g_debug ("%s: %d, set focus to tn to false",__FILE__,__LINE__);
/*hn_window_set_focus (tasknav,FALSE);*/
return;
- case HN_TN_ACTIVATE_MAIN_MENU:
- HN_DBG("activating main menu");
+ case HD_TN_ACTIVATE_MAIN_MENU:
+ g_debug ("activating main menu");
g_debug ("%s: %d, Here we toggle appswitcher's menu button",__FILE__,__LINE__);
/*hn_app_switcher_toggle_menu_button (hdwm.app_switcher);*/
return;
- case HN_TN_ACTIVATE_LAST_APP_WINDOW:
- HN_DBG("passing focus to last active window");
+ case HD_TN_ACTIVATE_LAST_APP_WINDOW:
+ g_debug ("passing focus to last active window");
hdwm.has_focus = FALSE;
hd_wm_focus_active_window ();
return;
@@ -1301,7 +1296,7 @@
button = hn_window_get_button_focus (tasknav,what);
if(button)
{
- HN_DBG("activating some other button");
+ g_debug ("activating some other button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
g_signal_emit_by_name(button, "toggled");
}
@@ -1313,7 +1308,7 @@
hdwm_power_key_timeout (gpointer data)
{
if (hdwm.shortcut != NULL &&
- hdwm.shortcut->action == HN_KEY_ACTION_POWER)
+ hdwm.shortcut->action == HD_KEY_ACTION_POWER)
{
hdwm.shortcut->action_func (hdwm.keys, GINT_TO_POINTER(TRUE));
hdwm.shortcut = NULL;
@@ -1339,7 +1334,7 @@
{
XClientMessageEvent *cev = (XClientMessageEvent *)xevent;
- if (cev->message_type == hdwm.atoms[HN_ATOM_HILDON_FROZEN_WINDOW])
+ if (cev->message_type == hdwm.atoms[HD_ATOM_HILDON_FROZEN_WINDOW])
{
Window xwin_hung;
gboolean has_reawoken;
@@ -1347,7 +1342,7 @@
xwin_hung = (Window)cev->data.l[0];
has_reawoken = (gboolean)cev->data.l[1];
- HN_DBG("@@@@ FROZEN: Window %li status %i @@@@",
+ g_debug ("@@@@ FROZEN: Window %li status %i @@@@",
xwin_hung, has_reawoken);
win = g_hash_table_lookup(hdwm.watched_windows,
@@ -1362,9 +1357,9 @@
}
}
- else if (cev->message_type == hdwm.atoms[HN_ATOM_HILDON_TN_ACTIVATE])
+ else if (cev->message_type == hdwm.atoms[HD_ATOM_HILDON_TN_ACTIVATE])
{
- HN_DBG("_HILDON_TN_ACTIVATE: %d", (int)cev->data.l[0]);
+ g_debug ("_HILDON_TN_ACTIVATE: %d", (int)cev->data.l[0]);
hd_wm_activate(cev->data.l[0]);
}
return GDK_FILTER_CONTINUE;
@@ -1373,10 +1368,10 @@
if (((XEvent*)xevent)->type == KeyPress)
{
XKeyEvent *kev = (XKeyEvent *)xevent;
- hdwm.shortcut = hn_keys_handle_keypress (hdwm.keys, kev->keycode, kev->state);
+ hdwm.shortcut = hd_keys_handle_keypress (hdwm.keys, kev->keycode, kev->state);
if (hdwm.shortcut != NULL &&
- hdwm.shortcut->action == HN_KEY_ACTION_POWER &&
+ hdwm.shortcut->action == HD_KEY_ACTION_POWER &&
!hdwm.power_key_timeout)
{
hdwm.power_key_timeout = g_timeout_add
@@ -1413,21 +1408,21 @@
if (G_LIKELY(prop->window == GDK_ROOT_WINDOW()))
{
- if (prop->atom == hdwm.atoms[HN_ATOM_MB_APP_WINDOW_LIST_STACKING])
+ if (prop->atom == hdwm.atoms[HD_ATOM_MB_APP_WINDOW_LIST_STACKING])
{
hd_wm_process_x_client_list();
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_MB_CURRENT_APP_WINDOW])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_MB_CURRENT_APP_WINDOW])
{
hd_wm_process_mb_current_app_window ();
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_NET_SHOWING_DESKTOP])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_NET_SHOWING_DESKTOP])
{
int *desktop_state;
desktop_state =
hd_wm_util_get_win_prop_data_and_validate (GDK_WINDOW_XID(gdk_get_default_root_window()),
- hdwm.atoms[HN_ATOM_NET_SHOWING_DESKTOP],
+ hdwm.atoms[HD_ATOM_NET_SHOWING_DESKTOP],
XA_CARDINAL,
32,
1,
@@ -1442,16 +1437,16 @@
XFree(desktop_state);
}
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_MB_NUM_MODAL_WINDOWS_PRESENT])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_MB_NUM_MODAL_WINDOWS_PRESENT])
{
- HN_DBG ("Received MODAL WINDOWS notification");
+ g_debug ("Received MODAL WINDOWS notification");
int * value;
value =
hd_wm_util_get_win_prop_data_and_validate (
GDK_WINDOW_XID(gdk_get_default_root_window()),
- hdwm.atoms[HN_ATOM_MB_NUM_MODAL_WINDOWS_PRESENT],
+ hdwm.atoms[HD_ATOM_MB_NUM_MODAL_WINDOWS_PRESENT],
XA_CARDINAL,
32,
1,
@@ -1460,7 +1455,7 @@
if (value)
{
hdwm.modal_windows = *value;
- HN_DBG ("value = %d", hdwm.modal_windows);
+ g_debug ("value = %d", hdwm.modal_windows);
XFree(value);
}
}
@@ -1474,18 +1469,18 @@
* lookup. FIXME: hmmm..
*/
- if ( prop->atom == hdwm.atoms[HN_ATOM_WM_NAME]
- || prop->atom == hdwm.atoms[HN_ATOM_WM_STATE]
- || prop->atom == hdwm.atoms[HN_ATOM_HILDON_VIEW_LIST]
- || prop->atom == hdwm.atoms[HN_ATOM_HILDON_VIEW_ACTIVE]
- || prop->atom == hdwm.atoms[HN_ATOM_HILDON_APP_KILLABLE]
- || prop->atom == hdwm.atoms[HN_ATOM_HILDON_ABLE_TO_HIBERNATE]
- || prop->atom == hdwm.atoms[HN_ATOM_NET_WM_STATE]
- || prop->atom == hdwm.atoms[HN_ATOM_WM_HINTS]
- || prop->atom == hdwm.atoms[HN_ATOM_NET_WM_ICON]
- || prop->atom == hdwm.atoms[HN_ATOM_MB_WIN_SUB_NAME]
- || prop->atom == hdwm.atoms[HN_ATOM_NET_WM_NAME]
- || prop->atom == hdwm.atoms[HN_ATOM_WM_WINDOW_ROLE])
+ if ( prop->atom == hdwm.atoms[HD_ATOM_WM_NAME]
+ || prop->atom == hdwm.atoms[HD_ATOM_WM_STATE]
+ || prop->atom == hdwm.atoms[HD_ATOM_HILDON_VIEW_LIST]
+ || prop->atom == hdwm.atoms[HD_ATOM_HILDON_VIEW_ACTIVE]
+ || prop->atom == hdwm.atoms[HD_ATOM_HILDON_APP_KILLABLE]
+ || prop->atom == hdwm.atoms[HD_ATOM_HILDON_ABLE_TO_HIBERNATE]
+ || prop->atom == hdwm.atoms[HD_ATOM_NET_WM_STATE]
+ || prop->atom == hdwm.atoms[HD_ATOM_WM_HINTS]
+ || prop->atom == hdwm.atoms[HD_ATOM_NET_WM_ICON]
+ || prop->atom == hdwm.atoms[HD_ATOM_MB_WIN_SUB_NAME]
+ || prop->atom == hdwm.atoms[HD_ATOM_NET_WM_NAME]
+ || prop->atom == hdwm.atoms[HD_ATOM_WM_WINDOW_ROLE])
{
win = g_hash_table_lookup(hdwm.watched_windows,
@@ -1495,39 +1490,39 @@
if (!win)
return GDK_FILTER_CONTINUE;
- if (prop->atom == hdwm.atoms[HN_ATOM_WM_NAME]
- || prop->atom == hdwm.atoms[HN_ATOM_MB_WIN_SUB_NAME]
- || prop->atom == hdwm.atoms[HN_ATOM_NET_WM_NAME])
+ if (prop->atom == hdwm.atoms[HD_ATOM_WM_NAME]
+ || prop->atom == hdwm.atoms[HD_ATOM_MB_WIN_SUB_NAME]
+ || prop->atom == hdwm.atoms[HD_ATOM_NET_WM_NAME])
{
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_NAME);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_NAME);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_WM_STATE])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_WM_STATE])
{
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_WM_STATE);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_WM_STATE);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_NET_WM_ICON])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_NET_WM_ICON])
{
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_ICON);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_ICON);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_HILDON_VIEW_ACTIVE])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_HILDON_VIEW_ACTIVE])
{
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_HILDON_VIEW_ACTIVE);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_HILDON_VIEW_ACTIVE);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_WM_HINTS])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_WM_HINTS])
{
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_WMHINTS);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_WMHINTS);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_HILDON_VIEW_LIST])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_HILDON_VIEW_LIST])
{
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_HILDON_VIEW_LIST);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_HILDON_VIEW_LIST);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_WM_WINDOW_ROLE])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_WM_WINDOW_ROLE])
{
/* Windows realy shouldn't do this... */
- hd_wm_watched_window_props_sync (win, HN_WM_SYNC_WINDOW_ROLE);
+ hd_wm_watched_window_props_sync (win, HD_WM_SYNC_WINDOW_ROLE);
}
- else if (prop->atom == hdwm.atoms[HN_ATOM_HILDON_APP_KILLABLE]
- || prop->atom == hdwm.atoms[HN_ATOM_HILDON_ABLE_TO_HIBERNATE])
+ else if (prop->atom == hdwm.atoms[HD_ATOM_HILDON_APP_KILLABLE]
+ || prop->atom == hdwm.atoms[HD_ATOM_HILDON_ABLE_TO_HIBERNATE])
{
HDWMWatchableApp *app;
@@ -1540,7 +1535,7 @@
else
{
hd_wm_watched_window_props_sync (win,
- HN_WM_SYNC_HILDON_APP_KILLABLE);
+ HD_WM_SYNC_HILDON_APP_KILLABLE);
}
}
}
@@ -1557,11 +1552,11 @@
DIR *directory;
struct dirent *entry = NULL;
- HN_DBG("Attempting to open directory [%s]", DESKTOPENTRYDIR);
+ g_debug ("Attempting to open directory [%s]", DESKTOPENTRYDIR);
if ((directory = opendir(DESKTOPENTRYDIR)) == NULL)
{
- HN_DBG(" ##### Failed in opening " DESKTOPENTRYDIR " ##### ");
+ g_debug (" ##### Failed in opening " DESKTOPENTRYDIR " ##### ");
return NULL;
}
@@ -1579,7 +1574,7 @@
path = g_build_filename(DESKTOPENTRYDIR, entry->d_name, NULL);
- HN_DBG("Attempting to open desktop file [%s] ...", path);
+ g_debug ("Attempting to open desktop file [%s] ...", path);
app = hd_wm_watchable_app_new (path);
@@ -1635,7 +1630,7 @@
g_return_val_if_fail (service_name, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- HN_DBG("Checking if service: '%s' is watchable", service_name);
+ g_debug ("Checking if service: '%s' is watchable", service_name);
/* Is this 'service' watchable ? */
if ((app = hd_wm_lookup_watchable_app_via_service (service_name)) != NULL)
@@ -1644,7 +1639,7 @@
&& hdwm.lowmem_banner_timeout > 0
&& !hd_wm_watchable_app_has_windows (app))
{
- HN_DBG("Showing Launchbanner...");
+ g_debug ("Showing Launchbanner...");
/*
* This function takes care of the distinction between the Loading
* and Resuming banners, hence we no longer test for hibernation
@@ -1705,14 +1700,14 @@
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- HN_DBG("Checking if filename: '%s' is watchable pid='%i' status='%i'",
+ g_debug ("Checking if filename: '%s' is watchable pid='%i' status='%i'",
filename, pid, status);
/* Is this 'filename' watchable ? */
app = hd_wm_lookup_watchable_app_via_exec(filename);
if (app)
{
- HN_DBG("Showing app died dialog ...");
+ g_debug ("Showing app died dialog ...");
hd_wm_watchable_app_died_dialog_show(app);
}
return DBUS_HANDLER_RESULT_HANDLED;
@@ -1750,7 +1745,7 @@
/*
* we need to insert new_app into the old apps hash
*/
- HN_DBG("Inserting a new application");
+ g_debug ("Inserting a new application");
g_hash_table_insert(old_apps->apps,
g_strdup(hd_wm_watchable_app_get_class_name(new_app)),
new_app);
@@ -1764,7 +1759,7 @@
* we already have this app in the old_app hash, so we need to update
* it
*/
- HN_DBG("Updating existing application");
+ g_debug ("Updating existing application");
old_apps->update |= hd_wm_watchable_app_update(old_app, new_app);
/* the original should be left in the in new apps hash */
@@ -1821,13 +1816,13 @@
* we have no watched windows, i.e., no references to the apps, so we can
* just replace the old apps with the new ones
*/
- HN_DBG("Have no watched windows -- reinitialising watched apps");
+ g_debug ("Have no watched windows -- reinitialising watched apps");
g_hash_table_destroy(hdwm.watched_apps);
hdwm.watched_apps = hd_wm_watchable_apps_init();
return FALSE;
}
- HN_DBG("Some watched windows -- doing it the hard way");
+ g_debug ("Some watched windows -- doing it the hard way");
new_apps = hd_wm_watchable_apps_init();
@@ -1851,7 +1846,7 @@
if(std.update)
{
- HN_DBG("Some apps updated -- notifying AS");
+ g_debug ("Some apps updated -- notifying AS");
g_debug ("%s: %d, Here we notify changes to as",__FILE__,__LINE__);
/*
@@ -1940,11 +1935,11 @@
DIR *directory;
struct dirent *entry = NULL;
- HN_DBG("Attempting to open directory [%s]", DESKTOPENTRYDIR);
+ g_debug ("Attempting to open directory [%s]", DESKTOPENTRYDIR);
if ((directory = opendir(DESKTOPENTRYDIR)) == NULL)
{
- HN_DBG(" ##### Failed in opening " DESKTOPENTRYDIR " ##### ");
+ g_debug (" ##### Failed in opening " DESKTOPENTRYDIR " ##### ");
return NULL;
}
@@ -1962,7 +1957,7 @@
path = g_build_filename(DESKTOPENTRYDIR, entry->d_name, NULL);
- HN_DBG("Attempting to open desktop file [%s] ...", path);
+ g_debug ("Attempting to open desktop file [%s] ...", path);
app = hd_wm_watchable_app_new (path);
@@ -1987,14 +1982,14 @@
{
gchar *role, *hibernation_key = NULL;
- HN_DBG("#### computing hibernation key ####");
+ g_debug ("#### computing hibernation key ####");
g_return_val_if_fail(app, NULL);
gdk_error_trap_push();
role = hd_wm_util_get_win_prop_data_and_validate (xwin,
- hdwm.atoms[HN_ATOM_WM_WINDOW_ROLE],
+ hdwm.atoms[HD_ATOM_WM_WINDOW_ROLE],
XA_STRING,
8,
0,
@@ -2009,13 +2004,13 @@
if (role)
XFree(role);
- HN_DBG("#### hibernation key: %s ####", hibernation_key);
+ g_debug ("#### hibernation key: %s ####", hibernation_key);
return hibernation_key;
}
static void
-hd_wm_lowmem_cb (HNAppSwitcher *app_switcher,
+hd_wm_lowmem_cb (HDAppSwitcher *app_switcher,
gboolean is_on,
gpointer user_data)
{
@@ -2023,7 +2018,7 @@
}
static void
-hd_wm_bgkill_cb (HNAppSwitcher *app_switcher,
+hd_wm_bgkill_cb (HDAppSwitcher *app_switcher,
gboolean is_on,
gpointer user_data)
{
@@ -2031,7 +2026,7 @@
}
gboolean
-hd_wm_init (HNAppSwitcher *as)
+hd_wm_init (HDAppSwitcher *as)
{
DBusConnection *connection;
DBusError error;
@@ -2042,7 +2037,7 @@
osso_manager_t *osso_man = osso_manager_singleton_get_instance();
- hdwm.app_switcher = as;
+ /*hdwm.app_switcher = as;*/
/* Check for configurable lowmem values. */
@@ -2112,13 +2107,13 @@
/* Setup shortcuts */
- hdwm.keys = hn_keys_init ();
+ hdwm.keys = hd_keys_init ();
/* Track changes in the keymap */
keymap = gdk_keymap_get_default ();
g_signal_connect (G_OBJECT (keymap), "keys-changed",
- G_CALLBACK (hn_keys_reload), hdwm.keys);
+ G_CALLBACK (hd_keys_reload), hdwm.keys);
/* Get on the DBus */
@@ -2222,10 +2217,10 @@
hdwm.bg_kill_situation = b;
}
-HNAppSwitcher *
+HDAppSwitcher *
hd_wm_get_app_switcher(void)
{
- return hdwm.app_switcher;
+ return NULL;
}
gint
@@ -2323,7 +2318,7 @@
wm_type_atom
= hd_wm_util_get_win_prop_data_and_validate (xid,
- hdwm.atoms[HN_ATOM_NET_WM_STATE_FULLSCREEN],
+ hdwm.atoms[HD_ATOM_NET_WM_STATE_FULLSCREEN],
XA_ATOM,
32,
0,
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.h 2006-11-22 17:39:22 UTC (rev 8271)
@@ -35,7 +35,7 @@
#include <sys/time.h>
#include <gtk/gtk.h>
-#include "hd-wm-types.h"
+#include <libhildonwm/hd-wm-types.h>
#define HN_WANT_DEBUG 0 /* Set to 1 for more verbose hn */
@@ -136,7 +136,7 @@
* @param info the window/view to be topped
*
*/
-void hd_wm_top_item (HNEntryInfo *info);
+void hd_wm_top_item (HDEntryInfo *info);
/** Send 'top' request for a certain service
@@ -177,7 +177,7 @@
HDWMWatchableApp *app);
gboolean
-hd_wm_init (HNAppSwitcher *as);
+hd_wm_init (HDAppSwitcher *as);
void
hd_wm_dnotify_register (void);
@@ -222,7 +222,7 @@
extern inline void
hd_wm_set_bg_kill_situation(gboolean b);
-extern inline HNAppSwitcher *
+extern inline HDAppSwitcher *
hd_wm_get_app_switcher(void);
extern inline gint
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/libhildonwm.pc.in
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/libhildonwm.pc.in 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/libhildonwm.pc.in 2006-11-22 17:39:22 UTC (rev 8271)
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/libhildonwm
+localedir=@localedir@
+
+Name: libhildonwm
+Description: Hildon WM Lib
+Requires: hildon-libs >= 0.7.1 libxml-2.0 x11 xtst libosso
+Version: @VERSION@
+Libs: -L${libdir} -lhildonwm -lX11 -lXtst -losso
+Cflags: -I${includedir}
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/osso-manager.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/osso-manager.h 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/osso-manager.h 2006-11-22 17:39:22 UTC (rev 8271)
@@ -30,8 +30,6 @@
#include <libosso.h>
#include <X11/Xlib.h>
-/* hildon includes */
-#include "hildon-navigator.h"
#define APP_NAME_LEN 64
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test1.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test1.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test1.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -53,7 +53,7 @@
gtk_widget_set_size_request (GTK_WIDGET (panel2),80,gdk_screen_height ());
button = gtk_button_new_with_label("Testing");
- button2 = GTK_WIDGET (statusbar_item_wrapper_new ("sound","/usr/lib/hildon-status-bar/libsound.so",FALSE));
+ button2 = GTK_WIDGET (statusbar_item_wrapper_new ("load","/usr/lib/hildon-status-bar/libload.so",FALSE));
sbold = GTK_WIDGET (statusbar_item_wrapper_new ("helloworld_sb","/usr/lib/hildon-status-bar/libhelloworld_sb.so",FALSE));
button3 = GTK_WIDGET (tasknavigator_item_wrapper_new ("contacts","/usr/lib/hildon-navigator/libosso-contact-plugin.so"));
button4 = gtk_button_new_with_label("Testing 4");
Added: projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c 2006-11-22 17:18:09 UTC (rev 8270)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c 2006-11-22 17:39:22 UTC (rev 8271)
@@ -0,0 +1,14 @@
+#include <libhildonwm/hd-wm.h>
+
+int
+main (int argc, char **argv)
+{
+ gtk_init (&argc,&argv);
+
+ hd_wm_init (NULL);
+
+ gtk_main ();
+
+ return 0;
+}
+
- Previous message: [maemo-commits] r8262 - projects/connectivity/osso-bluez-compat/tags
- Next message: [maemo-commits] r8272 - projects/haf/trunk/python-osso
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
