remove unused variable

2002-11-20  Havoc Pennington  <hp@pobox.com>

	* src/window-props.c (set_icon_title): remove unused variable

	* src/screen.c (meta_screen_new): read an existing
	_NET_CURRENT_DESKTOP and restore it if set. Makes a restart even
	less visible.

	* src/workspace.c (set_active_space_hint): don't set the hint
	during the process of unmanaging a screen
This commit is contained in:
Havoc Pennington 2002-11-21 04:48:53 +00:00 committed by Havoc Pennington
parent cfa2e165ba
commit 6557627d8f
4 changed files with 45 additions and 4 deletions

View File

@ -1,3 +1,14 @@
2002-11-20 Havoc Pennington <hp@pobox.com>
* src/window-props.c (set_icon_title): remove unused variable
* src/screen.c (meta_screen_new): read an existing
_NET_CURRENT_DESKTOP and restore it if set. Makes a restart even
less visible.
* src/workspace.c (set_active_space_hint): don't set the hint
during the process of unmanaging a screen
2002-11-20 Havoc Pennington <hp@pobox.com>
* configure.in: add doc/Makefile

View File

@ -367,6 +367,7 @@ meta_screen_new (MetaDisplay *display,
Atom wm_sn_atom;
char buf[128];
Time manager_timestamp;
gulong current_workspace;
replace_current_wm = meta_get_replace_current_wm ();
@ -567,13 +568,24 @@ meta_screen_new (MetaDisplay *display,
meta_screen_update_workspace_layout (screen);
meta_screen_update_workspace_names (screen);
/* Get current workspace */
current_workspace = 0;
if (meta_prop_get_cardinal (screen->display,
screen->xroot,
screen->display->atom_net_current_desktop,
&current_workspace))
meta_verbose ("Read existing _NET_CURRENT_DESKTOP = %d\n",
(int) current_workspace);
else
meta_verbose ("No _NET_CURRENT_DESKTOP present\n");
/* Screens must have at least one workspace at all times,
* so create that required workspace.
*/
meta_workspace_activate (meta_workspace_new (screen));
update_num_workspaces (screen);
screen->all_keys_grabbed = FALSE;
screen->keys_grabbed = FALSE;
meta_screen_grab_keys (screen);
@ -597,6 +609,17 @@ meta_screen_new (MetaDisplay *display,
screen->startup_sequences = NULL;
screen->startup_sequence_timeout = 0;
#endif
/* Switch to the _NET_CURRENT_DESKTOP workspace */
{
MetaWorkspace *space;
space = meta_screen_get_workspace_by_index (screen,
current_workspace);
if (space != NULL)
meta_workspace_activate (space);
}
meta_verbose ("Added screen %d ('%s') root 0x%lx\n",
screen->number, screen->screen_name, screen->xroot);

View File

@ -259,8 +259,6 @@ static void
set_icon_title (MetaWindow *window,
const char *title)
{
char *str;
g_free (window->icon_name);
if (title == NULL)
@ -309,7 +307,7 @@ init_wm_icon_name (MetaDisplay *display,
static void
reload_wm_icon_name (MetaWindow *window,
MetaPropValue *value)
MetaPropValue *value)
{
if (window->using_net_wm_icon_name)
{

View File

@ -279,6 +279,15 @@ static void
set_active_space_hint (MetaScreen *screen)
{
unsigned long data[1];
/* this is because we destroy the spaces in order,
* so we always end up setting a current desktop of
* 0 when closing a screen, so lose the current desktop
* on restart. By doing this we keep the current
* desktop on restart.
*/
if (screen->closing > 0)
return;
data[0] = meta_workspace_index (screen->active_workspace);