mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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:
parent
cfa2e165ba
commit
6557627d8f
11
ChangeLog
11
ChangeLog
@ -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
|
||||
|
23
src/screen.c
23
src/screen.c
@ -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 ();
|
||||
|
||||
@ -568,6 +569,17 @@ 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,
|
||||
¤t_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.
|
||||
*/
|
||||
@ -598,6 +610,17 @@ meta_screen_new (MetaDisplay *display,
|
||||
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);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -280,6 +280,15 @@ 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);
|
||||
|
||||
meta_verbose ("Setting _NET_CURRENT_DESKTOP to %ld\n", data[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user