* If one of window has is_focused = 1, then it is the most important.
* Otherwise, the higher in the window stack, the more important window.
*/
- if (!window->is_focused)
- return RESOURCED_ERROR_NONE;
-
existing_window = g_hash_table_lookup(window_table, (gconstpointer) &window->pid);
- if (existing_window)
+ if (existing_window && !window->is_focused)
return RESOURCED_ERROR_NONE;
new_window = calloc(1, sizeof(struct proc_app_window_info));