[maemo-developers] active applications switch enabling in libhildonwm.
From: Li, Horace horace.li at intel.comDate: Fri Aug 31 09:11:17 EEST 2007
- Previous message: latest rtcomm beta b0rked my "add account" button.
- Next message: udhcpc and hostname
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, All, This is Horace from Intel, and I am working on moblin project, which uses hildon as application framework. I have been working on hildon framework for several months and am pleased to send email here. I created a patch in libhildonwm to enable the active applications switching by clicking buttons on task navigator panel. The main purpose I created a new interface to switch applications is that currently hd_wm_switch_instance_current_widnow seems not to switch active windows well. Could anyone who is in charge of hildon-desktop help me to review this, and if possible, integrate this into upstream? I made a not-so-good diff, so those lines beginning with "-" are what I added. Any questions, please feel free to contact with me. Thanks, Horace ------------------------------------------------------------------------ ------------------ diff --git a/libhildonwm/hd-wm.c b/libhildonwm/hd-wm.c index 9a65234..007f620 100644 --- a/libhildonwm/hd-wm.c +++ b/libhildonwm/hd-wm.c @@ -1187,18 +1187,15 @@ hd_wm_top_item (HDWMEntryInfo *info) if (app) { - //if (hd_wm_window_is_hibernating (win)) + if (hd_wm_window_is_hibernating (win)) { - //hd_wm_debug ("Window hibernating, calling hd_wm_top_service\n"); - - if (hdwmpriv->active_window != win) - hdwmpriv->active_window = win; + hd_wm_debug ("Window hibernating, calling hd_wm_top_service\n"); /* make sure we top the window user requested */ hd_wm_application_set_active_window(app, win); hd_wm_top_service (hd_wm_application_get_service (app)); - //return; + return; } } @@ -3317,66 +3314,5 @@ hd_wm_switch_instance_current_window (HDWM *hdwm, gboolean to_next) (hdwm, hd_wm_entry_info_get_parent (HD_WM_ENTRY_INFO (hdwm->priv->active_window)), to_next); -} - -void -hd_wm_switch_instance_current_application (HDWM *hdwm, gboolean to_next) -{ - GList *applications_list = NULL, *iter, *new_entry; - HDWMApplication *application; - HDWMEntryInfo *app_info; - HDWMWindow *window, *newwin; - - if (!hdwm->priv->active_window) - return; - - applications_list = hd_wm_get_applications (hdwm); - - for (iter = applications_list; iter != NULL; iter = g_list_next (iter)) - { - application = HD_WM_APPLICATION(iter->data); - - g_warning ("application is %x.\n", (unsigned int)application); - } - - for (iter = applications_list; iter != NULL; iter = g_list_next (iter)) - { - application = HD_WM_APPLICATION(iter->data); - - window = hd_wm_application_get_active_window (application); - - g_warning ("current found app is %x; widnow is %x; active window is %x.\n", (unsigned int)application, (unsigned int)window, (unsigned int)hdwm->priv->active_window); - - if(window == hdwm->priv->active_window) - { - if (to_next) - { - new_entry = g_list_next (iter); - if (!new_entry) - { - new_entry = g_list_first((GList *)applications_list); - } - } - else - { - new_entry = g_list_previous (iter); - if (!new_entry) - { - new_entry = g_list_last((GList *)applications_list); - } - } - - newwin = hd_wm_application_get_active_window (HD_WM_APPLICATION (new_entry->data)); - g_warning ("new application is %x.\n", (unsigned int)newwin); - app_info = HD_WM_ENTRY_INFO (newwin); - - if (app_info) - { - hd_wm_top_item (app_info); - g_signal_emit_by_name (hdwm, "entry_info_stack_changed", app_info); - break; - } - } - } } diff --git a/libhildonwm/hd-wm.h b/libhildonwm/hd-wm.h index 3256a03..82f49e0 100644 --- a/libhildonwm/hd-wm.h +++ b/libhildonwm/hd-wm.h @@ -297,9 +297,6 @@ hd_wm_switch_info_window (HDWM *hdwm, HDWMEntryInfo *entry_info, gboolean to_nex void hd_wm_switch_instance_current_window (HDWM *hdwm, gboolean to_next); -void -hd_wm_switch_instance_current_application (HDWM *hdwm, gboolean to_next); - GHashTable * hd_wm_get_icon_cache (HDWM *hdwm); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20070831/152205e1/attachment.htm
- Previous message: latest rtcomm beta b0rked my "add account" button.
- Next message: udhcpc and hostname
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]