mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
move from workspace.c. (update_num_workspaces): set the hint here. Fixes
2002-08-14 Mark McLoughlin <mark@skynet.ie> * src/screen.c: (set_number_of_spaces_hint), move from workspace.c. (update_num_workspaces): set the hint here. Fixes #90123. * src/workspace.c: (meta_workspace_new), (meta_workspace_free): don't set the hint here. (update_num_workspaces): move to screen.c
This commit is contained in:
parent
42440b17e8
commit
689bcd14aa
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2002-08-14 Mark McLoughlin <mark@skynet.ie>
|
||||||
|
|
||||||
|
* src/screen.c: (set_number_of_spaces_hint), move from
|
||||||
|
workspace.c.
|
||||||
|
(update_num_workspaces): set the hint here. Fixes #90123.
|
||||||
|
|
||||||
|
* src/workspace.c:
|
||||||
|
(meta_workspace_new), (meta_workspace_free): don't set
|
||||||
|
the hint here.
|
||||||
|
(update_num_workspaces): move to screen.c
|
||||||
|
|
||||||
2002-08-12 Havoc Pennington <hp@redhat.com>
|
2002-08-12 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* src/stack.c (compute_layer): window is in fullscreen layer if
|
* src/stack.c (compute_layer): window is in fullscreen layer if
|
||||||
|
27
src/screen.c
27
src/screen.c
@ -744,6 +744,27 @@ meta_screen_get_n_workspaces (MetaScreen *screen)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
set_number_of_spaces_hint (MetaScreen *screen,
|
||||||
|
int n_spaces)
|
||||||
|
{
|
||||||
|
unsigned long data[1];
|
||||||
|
|
||||||
|
if (screen->closing > 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
data[0] = n_spaces;
|
||||||
|
|
||||||
|
meta_verbose ("Setting _NET_NUMBER_OF_DESKTOPS to %ld\n", data[0]);
|
||||||
|
|
||||||
|
meta_error_trap_push (screen->display);
|
||||||
|
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||||
|
screen->display->atom_net_number_of_desktops,
|
||||||
|
XA_CARDINAL,
|
||||||
|
32, PropModeReplace, (guchar*) data, 1);
|
||||||
|
return meta_error_trap_pop (screen->display);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_num_workspaces (MetaScreen *screen)
|
update_num_workspaces (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
@ -818,16 +839,14 @@ update_num_workspaces (MetaScreen *screen)
|
|||||||
|
|
||||||
g_list_free (extras);
|
g_list_free (extras);
|
||||||
|
|
||||||
/* Add missing workspaces. FIXME This will keep setting the
|
|
||||||
* number-of-workspaces root window property on each workspace
|
|
||||||
* creation, kind of a lame thing
|
|
||||||
*/
|
|
||||||
while (i < new_num)
|
while (i < new_num)
|
||||||
{
|
{
|
||||||
meta_workspace_new (screen);
|
meta_workspace_new (screen);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_number_of_spaces_hint (screen, new_num);
|
||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
|
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
|
||||||
|
|
||||||
static int set_number_of_spaces_hint (MetaScreen *screen);
|
|
||||||
static int set_active_space_hint (MetaScreen *screen);
|
static int set_active_space_hint (MetaScreen *screen);
|
||||||
|
|
||||||
MetaWorkspace*
|
MetaWorkspace*
|
||||||
@ -51,9 +50,6 @@ meta_workspace_new (MetaScreen *screen)
|
|||||||
workspace->name = g_strdup_printf (_("Workspace %d"),
|
workspace->name = g_strdup_printf (_("Workspace %d"),
|
||||||
meta_workspace_index (workspace) + 1);
|
meta_workspace_index (workspace) + 1);
|
||||||
|
|
||||||
/* Update hint for current number of workspaces */
|
|
||||||
set_number_of_spaces_hint (screen);
|
|
||||||
|
|
||||||
return workspace;
|
return workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,8 +90,6 @@ meta_workspace_free (MetaWorkspace *workspace)
|
|||||||
|
|
||||||
g_free (workspace);
|
g_free (workspace);
|
||||||
|
|
||||||
/* Update hint for current number of workspaces */
|
|
||||||
set_number_of_spaces_hint (screen);
|
|
||||||
/* don't bother to reset names, pagers can just ignore
|
/* don't bother to reset names, pagers can just ignore
|
||||||
* extra ones
|
* extra ones
|
||||||
*/
|
*/
|
||||||
@ -308,26 +302,6 @@ meta_workspace_list_windows (MetaWorkspace *workspace)
|
|||||||
return workspace_windows;
|
return workspace_windows;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
set_number_of_spaces_hint (MetaScreen *screen)
|
|
||||||
{
|
|
||||||
unsigned long data[1];
|
|
||||||
|
|
||||||
if (screen->closing > 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
data[0] = meta_screen_get_n_workspaces (screen);
|
|
||||||
|
|
||||||
meta_verbose ("Setting _NET_NUMBER_OF_DESKTOPS to %ld\n", data[0]);
|
|
||||||
|
|
||||||
meta_error_trap_push (screen->display);
|
|
||||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
|
||||||
screen->display->atom_net_number_of_desktops,
|
|
||||||
XA_CARDINAL,
|
|
||||||
32, PropModeReplace, (guchar*) data, 1);
|
|
||||||
return meta_error_trap_pop (screen->display);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
set_active_space_hint (MetaScreen *screen)
|
set_active_space_hint (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user