mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
Patch from Björn Lindqvist fix the workspace switcher tabpopup to display
2005-10-03 Elijah Newren <newren@gmail.com> Patch from Björn Lindqvist fix the workspace switcher tabpopup to display the right windows and to fix the pick-a-new-window-to-focus algorithm in order to not select windows that aren't showing. Fixes #170475. * src/tabpopup.c (meta_convert_meta_to_wnck, meta_select_workspace_expose_event): factor out conversion code from meta_select_workspace_expose_event() into the new meta_convert_meta_to_wnck() function * src/tabpopup.c (meta_select_workspace_expose_event): * src/workspace.c (focus_ancestor_or_mru_window): replace the buggy window->minimized logic with !meta_window_showing_on_its_workspace (window)
This commit is contained in:
parent
47f1a8634b
commit
ea4cd88285
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2005-10-03 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Patch from Björn Lindqvist fix the workspace switcher tabpopup to
|
||||
display the right windows and to fix the
|
||||
pick-a-new-window-to-focus algorithm in order to not select
|
||||
windows that aren't showing. Fixes #170475.
|
||||
|
||||
* src/tabpopup.c (meta_convert_meta_to_wnck,
|
||||
meta_select_workspace_expose_event): factor out conversion code
|
||||
from meta_select_workspace_expose_event() into the new
|
||||
meta_convert_meta_to_wnck() function
|
||||
|
||||
* src/tabpopup.c (meta_select_workspace_expose_event):
|
||||
* src/workspace.c (focus_ancestor_or_mru_window):
|
||||
replace the buggy window->minimized logic with
|
||||
!meta_window_showing_on_its_workspace (window)
|
||||
|
||||
2005-10-03 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Patch from Björn Lindqvist to have ancestors come along with the
|
||||
|
@ -808,6 +808,40 @@ meta_select_workspace_class_init (MetaSelectWorkspaceClass *klass)
|
||||
widget_class->expose_event = meta_select_workspace_expose_event;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_convert_meta_to_wnck() converts a MetaWindow to a
|
||||
* WnckWindowDisplayInfo window that is used to build a thumbnail of a
|
||||
* workspace.
|
||||
**/
|
||||
static WnckWindowDisplayInfo
|
||||
meta_convert_meta_to_wnck (MetaWindow *window, MetaScreen *screen)
|
||||
{
|
||||
WnckWindowDisplayInfo wnck_window;
|
||||
wnck_window.icon = window->icon;
|
||||
wnck_window.mini_icon = window->mini_icon;
|
||||
|
||||
wnck_window.is_active = FALSE;
|
||||
if (window == window->display->expected_focus_window)
|
||||
wnck_window.is_active = TRUE;
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
wnck_window.x = window->frame->rect.x;
|
||||
wnck_window.y = window->frame->rect.y;
|
||||
wnck_window.width = window->frame->rect.width;
|
||||
wnck_window.height = window->frame->rect.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
wnck_window.x = window->rect.x;
|
||||
wnck_window.y = window->rect.y;
|
||||
wnck_window.width = window->rect.width;
|
||||
wnck_window.height = window->rect.height;
|
||||
}
|
||||
return wnck_window;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
meta_select_workspace_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
@ -836,7 +870,7 @@ meta_select_workspace_expose_event (GtkWidget *widget,
|
||||
workspace != workspace->screen->active_workspace;
|
||||
|
||||
if (window->skip_pager ||
|
||||
window->minimized ||
|
||||
!meta_window_showing_on_its_workspace (window) ||
|
||||
window->unmaps_pending ||
|
||||
ignoreable_sticky)
|
||||
{
|
||||
@ -844,26 +878,7 @@ meta_select_workspace_expose_event (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
windows[i].icon = window->icon;
|
||||
windows[i].mini_icon = window->mini_icon;
|
||||
windows[i].is_active =
|
||||
(window == window->display->expected_focus_window);
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
windows[i].x = window->frame->rect.x;
|
||||
windows[i].y = window->frame->rect.y;
|
||||
windows[i].width = window->frame->rect.width;
|
||||
windows[i].height = window->frame->rect.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
windows[i].x = window->rect.x;
|
||||
windows[i].y = window->rect.y;
|
||||
windows[i].width = window->rect.width;
|
||||
windows[i].height = window->rect.height;
|
||||
}
|
||||
|
||||
windows[i] = meta_convert_meta_to_wnck (window, workspace->screen);
|
||||
i++;
|
||||
}
|
||||
tmp = tmp->next;
|
||||
|
@ -910,7 +910,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
|
||||
MetaWindow* tmp_window;
|
||||
tmp_window = ((MetaWindow*) tmp->data);
|
||||
if (tmp_window != not_this_one &&
|
||||
!tmp_window->minimized &&
|
||||
meta_window_showing_on_its_workspace (tmp_window) &&
|
||||
tmp_window->type != META_WINDOW_DOCK &&
|
||||
tmp_window->type != META_WINDOW_DESKTOP)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user