mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
set active_workspace to NULL. Also actually activate the first workspace
2002-08-02 Mark McLoughlin <mark@skynet.ie> * src/screen.c: (meta_screen_new): set active_workspace to NULL. Also actually activate the first workspace instead of just setting active_workspace. Fixes #87367. (meta_screen_ensure_workspace_popup): don't re-use our iterator for setting the entries list, stop iterating when we've gone beyond the last workspace (there may be empty spaces in the last row). * src/workspace.c: (meta_workspace_activate): if no workspace was previously activated, return.
This commit is contained in:
parent
583596178f
commit
8984fd358b
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2002-08-02 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* src/screen.c: (meta_screen_new): set active_workspace
|
||||
to NULL. Also actually activate the first workspace instead
|
||||
of just setting active_workspace. Fixes #87367.
|
||||
(meta_screen_ensure_workspace_popup): don't re-use our
|
||||
iterator for setting the entries list, stop iterating
|
||||
when we've gone beyond the last workspace (there may
|
||||
be empty spaces in the last row).
|
||||
|
||||
* src/workspace.c: (meta_workspace_activate): if no workspace
|
||||
was previously activated, return.
|
||||
|
||||
2002-08-04 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/theme.c (free_menu_ops): use MetaMenuIconType not button
|
||||
|
23
src/screen.c
23
src/screen.c
@ -342,6 +342,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
|
||||
screen->work_area_idle = 0;
|
||||
|
||||
screen->active_workspace = NULL;
|
||||
screen->rows_of_workspaces = 1;
|
||||
screen->columns_of_workspaces = -1;
|
||||
screen->vertical_workspaces = FALSE;
|
||||
@ -476,7 +477,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
/* Screens must have at least one workspace at all times,
|
||||
* so create that required workspace.
|
||||
*/
|
||||
screen->active_workspace = meta_workspace_new (screen);
|
||||
meta_workspace_activate (meta_workspace_new (screen));
|
||||
update_num_workspaces (screen);
|
||||
|
||||
screen->all_keys_grabbed = FALSE;
|
||||
@ -955,28 +956,32 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
|
||||
entries[len].icon = NULL;
|
||||
|
||||
meta_screen_calc_workspace_layout (screen, len, &rows, &cols);
|
||||
|
||||
|
||||
if (screen->vertical_workspaces)
|
||||
{
|
||||
int j, k;
|
||||
int j, k, iter;
|
||||
|
||||
for (i = 0; i < rows; ++i)
|
||||
for (i = 0, iter = 0; i < rows; ++i)
|
||||
{
|
||||
for (j = 0; j < cols; ++j)
|
||||
{
|
||||
MetaWorkspace *workspace;
|
||||
|
||||
k = i + (j * rows);
|
||||
workspace = meta_display_get_workspace_by_index (screen->display,
|
||||
k);
|
||||
if (k >= len)
|
||||
break;
|
||||
|
||||
workspace = meta_display_get_workspace_by_index (screen->display, k);
|
||||
g_assert (workspace);
|
||||
|
||||
entries[i].key = (MetaTabEntryKey) workspace;
|
||||
entries[i].title = workspace->name;
|
||||
entries[i].icon = NULL;
|
||||
entries[iter].key = (MetaTabEntryKey) workspace;
|
||||
entries[iter].title = workspace->name;
|
||||
entries[iter].icon = NULL;
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
|
||||
g_assert (iter == len);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -219,7 +219,10 @@ meta_workspace_activate (MetaWorkspace *workspace)
|
||||
workspace->screen->active_workspace = workspace;
|
||||
|
||||
set_active_space_hint (workspace->screen);
|
||||
|
||||
|
||||
if (old == NULL)
|
||||
return;
|
||||
|
||||
meta_workspace_queue_calc_showing (old);
|
||||
meta_workspace_queue_calc_showing (workspace);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user