Author: olivier
Date: 2007-04-02 19:48:21 +0000 (Mon, 02 Apr 2007)
New Revision: 25372

Modified:
   xfwm4/branches/xfce_4_4/defaults/defaults
   xfwm4/branches/xfce_4_4/doc/C/xfwm4.html
   xfwm4/branches/xfce_4_4/doc/C/xfwm4.xml
   xfwm4/branches/xfce_4_4/doc/fr/xfwm4.html
   xfwm4/branches/xfce_4_4/doc/it/xfwm4.html
   xfwm4/branches/xfce_4_4/src/client.c
   xfwm4/branches/xfce_4_4/src/events.c
   xfwm4/branches/xfce_4_4/src/settings.c
   xfwm4/branches/xfce_4_4/src/settings.h
Log:
Implement a better (usability) fix for windows that raise themselves (Bug #2961)

Modified: xfwm4/branches/xfce_4_4/defaults/defaults
===================================================================
--- xfwm4/branches/xfce_4_4/defaults/defaults   2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/defaults/defaults   2007-04-02 19:48:21 UTC (rev 
25372)
@@ -1,7 +1,7 @@
+activate_action=bring
 borderless_maximize=true
 box_move=false
 box_resize=false
-bring_on_activate=true
 button_layout=OT|SHMC
 button_offset=0
 button_spacing=0

Modified: xfwm4/branches/xfce_4_4/doc/C/xfwm4.html
===================================================================
--- xfwm4/branches/xfce_4_4/doc/C/xfwm4.html    2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/doc/C/xfwm4.html    2007-04-02 19:48:21 UTC (rev 
25372)
@@ -1,5 +1,5 @@
 <html><head><meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1"><title>Xfce 4 Window Manager</title><link rel="stylesheet" 
href="../xfce.css" type="text/css"><meta name="generator" content="DocBook XSL 
Stylesheets V1.68.1"><link rel="start" href="#xfwm4" title="Xfce 4 Window 
Manager"><link rel="next" href="#wm-intro" title="Introduction"></head><body 
bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF"><div class="article" lang="en"><div 
class="titlepage"><div><div><h1 class="title"><a name="xfwm4"></a>Xfce 4 Window 
Manager</h1></div><div><div class="authorgroup"><div class="author"><h3 
class="author"><span class="firstname">Fran�ois</span> <span class="surname">Le 
Clainche</span></h3><div class="affiliation"><div class="address"><p><code 
class="email">&lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>&gt;</code></p></div></div></div></div></div><div><span 
xmlns="http://www.w3.org/TR/xhtml1/transitional"; class="r
 eleaseinfo">This manual describes <strong xmlns="" 
class="application"><code>xfwm4</code></strong> version 4.2.0
-  <br></br></span></div><div><p class="copyright">Copyright � 2004 Fran�ois Le 
Clainche</p></div><div><p class="copyright">Copyright � 2004 Jasper 
Huijsmans</p></div></div><hr></div><div class="toc"><p><b>Table of 
Contents</b></p><dl><dt><span class="sect1"><a 
href="#wm-intro">Introduction</a></span></dt><dt><span class="sect1"><a 
href="#wm-using">Using <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-windows">Manage 
windows</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-settings">Customizing <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-style">Decoration style</a></span></dt><dt><span 
class="sect2"><a href="#keyboard_shortcuts">Keyboard 
shortcuts</a></span></dt><dt><span class="sect2"><a href="#focus">Focus 
preferences</a></span></dt><dt><span class="sect2"><a 
href="#wm_advanced">Advanced settings</a></span></dt></dl></dd><d
 t><span class="sect1"><a href="#workspaces">Managing 
workspaces</a></span></dt><dd><dl><dt><span class="sect2"><a 
href="#id285779">Workspaces settings</a></span></dt><dt><span class="sect2"><a 
href="#workspace-margins">Workspaces margins</a></span></dt></dl></dd><dt><span 
class="sect1"><a href="#wm-copyright">About <strong 
class="application"><code>xfwm4</code></strong></a></span></dt></dl></div><p>�</p><div
 class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" 
style="clear: both"><a 
name="wm-intro"></a>Introduction</h2></div></div></div><p>The Xfce 4 Window 
Manager is part of the <a href="http://www.xfce.org"; target="_top">Xfce Desktop 
Environment</a>.
+  <br></br></span></div><div><p class="copyright">Copyright � 2004 Fran�ois Le 
Clainche</p></div><div><p class="copyright">Copyright � 2004 Jasper 
Huijsmans</p></div></div><hr></div><div class="toc"><p><b>Table of 
Contents</b></p><dl><dt><span class="sect1"><a 
href="#wm-intro">Introduction</a></span></dt><dt><span class="sect1"><a 
href="#wm-using">Using <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-windows">Manage 
windows</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-settings">Customizing <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-style">Decoration style</a></span></dt><dt><span 
class="sect2"><a href="#keyboard_shortcuts">Keyboard 
shortcuts</a></span></dt><dt><span class="sect2"><a href="#focus">Focus 
preferences</a></span></dt><dt><span class="sect2"><a 
href="#wm_advanced">Advanced settings</a></span></dt></dl></dd><d
 t><span class="sect1"><a href="#workspaces">Managing 
workspaces</a></span></dt><dd><dl><dt><span class="sect2"><a 
href="#id285780">Workspaces settings</a></span></dt><dt><span class="sect2"><a 
href="#workspace-margins">Workspaces margins</a></span></dt></dl></dd><dt><span 
class="sect1"><a href="#wm-copyright">About <strong 
class="application"><code>xfwm4</code></strong></a></span></dt></dl></div><p>�</p><div
 class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" 
style="clear: both"><a 
name="wm-intro"></a>Introduction</h2></div></div></div><p>The Xfce 4 Window 
Manager is part of the <a href="http://www.xfce.org"; target="_top">Xfce Desktop 
Environment</a>.
     The actual command to run is <strong 
class="application"><code>xfwm4</code></strong>. To run it in the background 
use 
     <span><strong class="command"><strong 
class="application"><code>xfwm4</code></strong> --daemon</strong></span>. The 
window manager is responsible for
     the placement of windows on the screen, provides the window
@@ -175,14 +175,17 @@
          content will save some system resources).</p></dd><dt><span 
class="term">Double click action</span></dt><dd><p>Select what must be the 
behaviour of the window manager when you
          double-click on the title bar of a window : shade window, hide
          window, maximize window or none.</p></dd></dl></div></div></div><div 
class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a 
name="hidden_options"></a>Hidden options</h3></div></div></div><p>Some hidden 
options allow you to customize <strong 
class="application"><code>xfwm4</code></strong> behaviour. They have to be 
added by hand to your
-       HOME/.config/xfce4/xfwm4/xfwm4rc file. You may have to create this 
file.</p><div class="variablelist"><dl><dt><span 
class="term">bring_on_activate=false</span></dt><dd><p>Set this option to false 
if you don't want a window to be brought back
-                       on the current workspace when the application tries to 
raise it.
+       HOME/.config/xfce4/xfwm4/xfwm4rc file. You may have to create this 
file.</p><div class="variablelist"><dl><dt><span 
class="term">activate_action=bring|switch|none</span></dt><dd><p>How the window 
manager must react when a window raises itself.
+                       When set to "bring", the window manager to bring the 
window on the 
+                       current workspace, "switch" will switch to the window's 
workspace, and
+                       "none" will simply do nothing but set the "demand 
attention" flag on
+                       the window.
                        </p></dd></dl></div></div><p>�</p><div class="sect1" 
lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: 
both"><a name="workspaces"></a>Managing 
workspaces</h2></div></div></div><p><strong 
class="application"><code>xfwm4</code></strong> also manages workspaces. There 
is a special settings dialog to
     change the workspace properties. You can start it by choosing 
     <span class="emphasis"><em>Workspaces and Margins</em></span> from the the 
<a href="xfce-mcs-manager.html#manager-dialog" target="_top">settings manager
       dialog</a>. The dialog contains two tab folders where you can 
     change workspace settings and desktop margins.
-  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 
class="title"><a name="id285779"></a>Workspaces 
settings</h3></div></div></div><div class="figure"><a 
name="xfwm-workspace-fig"></a><p class="title"><b>Figure�7.�Workspace 
Settings</b></p><div class="screenshot"><div class="mediaobject"><img 
src="images/xfwm_workspaces.png" alt="Shows workspace settings tab folder.
+  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 
class="title"><a name="id285780"></a>Workspaces 
settings</h3></div></div></div><div class="figure"><a 
name="xfwm-workspace-fig"></a><p class="title"><b>Figure�7.�Workspace 
Settings</b></p><div class="screenshot"><div class="mediaobject"><img 
src="images/xfwm_workspaces.png" alt="Shows workspace settings tab folder.
            "></div></div></div><div class="variablelist"><dl><dt><span 
class="term">Workspaces</span></dt><dd><p>This option allows you too choose the 
number of workspaces you
            want to use (between 1 and 32).
          </p></dd><dt><span class="term">Worspace names</span></dt><dd><p>This 
field shows the list of avaible workspaces. If you want to

Modified: xfwm4/branches/xfce_4_4/doc/C/xfwm4.xml
===================================================================
--- xfwm4/branches/xfce_4_4/doc/C/xfwm4.xml     2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/doc/C/xfwm4.xml     2007-04-02 19:48:21 UTC (rev 
25372)
@@ -781,10 +781,13 @@
 
 <variablelist>
        <varlistentry>
-               <term>bring_on_activate=false</term>
+               <term>activate_action=bring|switch|none</term>
                        <listitem>
-                       <para>Set this option to false if you don't want a 
window to be brought back
-                       on the current workspace when the application tries to 
raise it.
+                       <para>How the window manager must react when a window 
raises itself.
+                       When set to "bring", the window manager to bring the 
window on the 
+                       current workspace, "switch" will switch to the window's 
workspace, and
+                       "none" will simply do nothing but set the "demand 
attention" flag on
+                       the window.
                        </para>
                        </listitem>
        </varlistentry> 

Modified: xfwm4/branches/xfce_4_4/doc/fr/xfwm4.html
===================================================================
--- xfwm4/branches/xfce_4_4/doc/fr/xfwm4.html   2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/doc/fr/xfwm4.html   2007-04-02 19:48:21 UTC (rev 
25372)
@@ -1,5 +1,5 @@
 <html><head><meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1"><title>Le gestionnaire de fen�tres de Xfce 4</title><link 
rel="stylesheet" href="../xfce.css" type="text/css"><meta name="generator" 
content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="#xfwm4" 
title="Le gestionnaire de fen�tres de Xfce 4"><link rel="next" href="#wm-intro" 
title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" 
vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div 
class="titlepage"><div><div><h1 class="title"><a name="xfwm4"></a>Le 
gestionnaire de fen�tres de Xfce 4</h1></div><div><div class="authorgroup"><div 
class="author"><h3 class="author"><span class="firstname">Fran�ois</span> <span 
class="surname">Le Clainche</span></h3><div class="affiliation"><div 
class="address"><p><code class="email">&lt;<a href="mailto:[EMAIL 
PROTECTED]">[EMAIL 
PROTECTED]</a>&gt;</code></p></div></div></div></div></div><div><span xmlns="ht
 tp://www.w3.org/TR/xhtml1/transitional" class="releaseinfo">Ce manuel d�crit 
la version 4.2 de <strong xmlns="" 
class="application"><code>xfwm4</code></strong>
-  <br></br></span></div><div><p class="copyright">Copyright � 2004 Fran�ois Le 
Clainche</p></div><div><p class="copyright">Copyright � 2004 Jasper 
Huijsmans</p></div></div><hr></div><div class="toc"><p><b>Table of 
Contents</b></p><dl><dt><span class="sect1"><a 
href="#wm-intro">Introduction</a></span></dt><dt><span class="sect1"><a 
href="#wm-using">Utiliser <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-windows">Gestion des 
fen�tres</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-settings">Personnaliser <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-style">Style des 
d�corations</a></span></dt><dt><span class="sect2"><a 
href="#keyboard_shortcuts">Raccourcis clavier</a></span></dt><dt><span 
class="sect2"><a href="#focus">Pr�f�rences de 
focalisation</a></span></dt><dt><span class="sect2"><a 
href="#wm_advanced">Param�tres avanc�s<
 /a></span></dt></dl></dd><dt><span class="sect1"><a href="#workspaces">Gestion 
des espaces de travail</a></span></dt><dd><dl><dt><span class="sect2"><a 
href="#id280197">Espaces de travail</a></span></dt><dt><span class="sect2"><a 
href="#workspace-margins">Marges des espaces de 
travail</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-copyright">� propos de <strong 
class="application"><code>xfwm4</code></strong></a></span></dt></dl></div><p>�</p><div
 class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" 
style="clear: both"><a 
name="wm-intro"></a>Introduction</h2></div></div></div><p>Le gestionnaire de 
fen�tres de Xfce 4 est un des �l�ments de l'<a href="http://www.xfce.org"; 
target="_top">environnement de bureau Xfce</a>.
+  <br></br></span></div><div><p class="copyright">Copyright � 2004 Fran�ois Le 
Clainche</p></div><div><p class="copyright">Copyright � 2004 Jasper 
Huijsmans</p></div></div><hr></div><div class="toc"><p><b>Table of 
Contents</b></p><dl><dt><span class="sect1"><a 
href="#wm-intro">Introduction</a></span></dt><dt><span class="sect1"><a 
href="#wm-using">Utiliser <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-windows">Gestion des 
fen�tres</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-settings">Personnaliser <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-style">Style des 
d�corations</a></span></dt><dt><span class="sect2"><a 
href="#keyboard_shortcuts">Raccourcis clavier</a></span></dt><dt><span 
class="sect2"><a href="#focus">Pr�f�rences de 
focalisation</a></span></dt><dt><span class="sect2"><a 
href="#wm_advanced">Param�tres avanc�s<
 /a></span></dt></dl></dd><dt><span class="sect1"><a href="#workspaces">Gestion 
des espaces de travail</a></span></dt><dd><dl><dt><span class="sect2"><a 
href="#id285895">Espaces de travail</a></span></dt><dt><span class="sect2"><a 
href="#workspace-margins">Marges des espaces de 
travail</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-copyright">� propos de <strong 
class="application"><code>xfwm4</code></strong></a></span></dt></dl></div><p>�</p><div
 class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" 
style="clear: both"><a 
name="wm-intro"></a>Introduction</h2></div></div></div><p>Le gestionnaire de 
fen�tres de Xfce 4 est un des �l�ments de l'<a href="http://www.xfce.org"; 
target="_top">environnement de bureau Xfce</a>.
     La commande � lancer est <strong 
class="application"><code>xfwm4</code></strong>. Pour le lancer en t�che de 
fond il faut utiliser la commande 
     <span><strong class="command"><strong 
class="application"><code>xfwm4</code></strong> --daemon</strong></span>. Le 
gestionnaire de fen�tres est responsable du placement des fen�tres sur l'�cran, 
     des d�corations des fen�tres et permet leur d�placement, leur 
redimensionnement ou leur fermeture.
@@ -136,7 +136,7 @@
   il faut choisir <span class="emphasis"><em>"Marges et espaces de 
travail"</em></span> depuis le 
   <a href="xfce-mcs-manager.html#manager-dialog" target="_top">gestionnaire de 
param�tres</a>. 
   Cette fen�tre contient deux onglets.
-  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 
class="title"><a name="id280197"></a>Espaces de 
travail</h3></div></div></div><div class="figure"><a 
name="xfwm-workspace-fig"></a><p class="title"><b>Figure�7.�Param�tres des 
espaces de travail</b></p><div class="screenshot"><div class="mediaobject"><img 
src="images/xfwm_workspaces.png" alt="Montre la fen�tre des pr�f�rences des 
espaces de travail
+  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 
class="title"><a name="id285895"></a>Espaces de 
travail</h3></div></div></div><div class="figure"><a 
name="xfwm-workspace-fig"></a><p class="title"><b>Figure�7.�Param�tres des 
espaces de travail</b></p><div class="screenshot"><div class="mediaobject"><img 
src="images/xfwm_workspaces.png" alt="Montre la fen�tre des pr�f�rences des 
espaces de travail
            "></div></div></div><div class="variablelist"><dl><dt><span 
class="term">Espaces de travail</span></dt><dd><p>Cette option permet de 
choisir le nombre d'espaces de travail souhait� 
          (entre 1 et 32).
          </p></dd><dt><span class="term">Noms des espaces de 
travail</span></dt><dd><p>Ce champ montre la liste des espaces de travail 
disponibles. Pour �diter le nom de l'un d'entre eux, 

Modified: xfwm4/branches/xfce_4_4/doc/it/xfwm4.html
===================================================================
--- xfwm4/branches/xfce_4_4/doc/it/xfwm4.html   2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/doc/it/xfwm4.html   2007-04-02 19:48:21 UTC (rev 
25372)
@@ -1,5 +1,5 @@
 <html><head><meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1"><title>XFce 4 Window Manager</title><link rel="stylesheet" 
href="../xfce.css" type="text/css"><meta name="generator" content="DocBook XSL 
Stylesheets V1.68.1"><link rel="start" href="#xfwm4" title="XFce 4 Window 
Manager"><link rel="next" href="#wm-intro" title="Introduction"></head><body 
bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF"><div class="article" lang="en"><div 
class="titlepage"><div><div><h1 class="title"><a name="xfwm4"></a>XFce 4 Window 
Manager</h1></div><div><div class="authorgroup"><div class="author"><h3 
class="author"><span class="firstname">Fran�ois</span> <span class="surname">Le 
Clainche</span></h3><div class="affiliation"><div class="address"><p><code 
class="email">&lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>&gt;</code></p></div></div></div></div></div><div><span 
xmlns="http://www.w3.org/TR/xhtml1/transitional"; class="r
 eleaseinfo">This manual describes <strong xmlns="" 
class="application"><code>xfwm4</code></strong> version 4.0
-  <br></br></span></div><div><p class="copyright">Copyright � 2003 Fran�ois Le 
Clainche</p></div><div><p class="copyright">Copyright � 2003 Jasper 
Huijsmans</p></div></div><hr></div><div class="toc"><p><b>Table of 
Contents</b></p><dl><dt><span class="sect1"><a 
href="#wm-intro">Introduction</a></span></dt><dt><span class="sect1"><a 
href="#wm-using">Using <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-windows">Manage windows</a></span></dt><dt><span 
class="sect2"><a href="#wm-keybindings">Keyboard shortcuts 
summary</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-settings">Customizing <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-style">Decoration style</a></span></dt><dt><span 
class="sect2"><a href="#wm-focus">Keyboard and focus</a></span></dt><dt><span 
class="sect2"><a href="#wm_advanced">Advanced settings</a></span></dt></dl
 ></dd><dt><span class="sect1"><a href="#workspaces">Workspaces and 
 >Margins</a></span></dt><dd><dl><dt><span class="sect2"><a 
 >href="#id280012">Workspaces</a></span></dt><dt><span class="sect2"><a 
 >href="#workspace-margins">Workspace 
 >margins</a></span></dt></dl></dd><dt><span class="sect1"><a 
 >href="#wm-copyright">About <strong 
 >class="application"><code>xfwm4</code></strong></a></span></dt></dl></div><p>�</p><div
 > class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" 
 >style="clear: both"><a 
 >name="wm-intro"></a>Introduction</h2></div></div></div><p>The XFce 4 Window 
 >Manager is part of the <a href="http://www.xfce.org"; target="_top">XFce 
 >Desktop Environment</a>.
+  <br></br></span></div><div><p class="copyright">Copyright � 2003 Fran�ois Le 
Clainche</p></div><div><p class="copyright">Copyright � 2003 Jasper 
Huijsmans</p></div></div><hr></div><div class="toc"><p><b>Table of 
Contents</b></p><dl><dt><span class="sect1"><a 
href="#wm-intro">Introduction</a></span></dt><dt><span class="sect1"><a 
href="#wm-using">Using <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-windows">Manage windows</a></span></dt><dt><span 
class="sect2"><a href="#wm-keybindings">Keyboard shortcuts 
summary</a></span></dt></dl></dd><dt><span class="sect1"><a 
href="#wm-settings">Customizing <strong 
class="application"><code>xfwm4</code></strong></a></span></dt><dd><dl><dt><span
 class="sect2"><a href="#wm-style">Decoration style</a></span></dt><dt><span 
class="sect2"><a href="#wm-focus">Keyboard and focus</a></span></dt><dt><span 
class="sect2"><a href="#wm_advanced">Advanced settings</a></span></dt></dl
 ></dd><dt><span class="sect1"><a href="#workspaces">Workspaces and 
 >Margins</a></span></dt><dd><dl><dt><span class="sect2"><a 
 >href="#id285711">Workspaces</a></span></dt><dt><span class="sect2"><a 
 >href="#workspace-margins">Workspace 
 >margins</a></span></dt></dl></dd><dt><span class="sect1"><a 
 >href="#wm-copyright">About <strong 
 >class="application"><code>xfwm4</code></strong></a></span></dt></dl></div><p>�</p><div
 > class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" 
 >style="clear: both"><a 
 >name="wm-intro"></a>Introduction</h2></div></div></div><p>The XFce 4 Window 
 >Manager is part of the <a href="http://www.xfce.org"; target="_top">XFce 
 >Desktop Environment</a>.
     The actual command to run is <strong 
class="application"><code>xfwm4</code></strong>. To run it in the background 
use 
     <span><strong class="command"><strong 
class="application"><code>xfwm4</code></strong> --daemon</strong></span>. The 
window manager is responsible for
     the placement of windows on the screen, provides the window
@@ -167,7 +167,7 @@
     <span class="emphasis"><em>Workspaces and Margins</em></span> from the the 
<a href="xfce-mcs-manager.html#manager-dialog" target="_top">settings manager
       dialog</a>. The dialog contains two tab folders where you can 
     change workspace settings and desktop margins.
-  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 
class="title"><a name="id280012"></a>Workspaces</h3></div></div></div><div 
class="figure"><a name="xfwm-workspace-fig"></a><p 
class="title"><b>Figure�5.�Workspace Settings</b></p><div 
class="screenshot"><div class="mediaobject"><img 
src="images/xfwm_workspaces.png" alt="Shows workspace settings tab folder.
+  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 
class="title"><a name="id285711"></a>Workspaces</h3></div></div></div><div 
class="figure"><a name="xfwm-workspace-fig"></a><p 
class="title"><b>Figure�5.�Workspace Settings</b></p><div 
class="screenshot"><div class="mediaobject"><img 
src="images/xfwm_workspaces.png" alt="Shows workspace settings tab folder.
            "></div></div></div><div class="variablelist"><dl><dt><span 
class="term">Workspaces</span></dt><dd><p>This option allows you too choose the 
number of workspaces you
            want to use (between 1 and 32).
          </p></dd><dt><span class="term">Worspace names</span></dt><dd><p>This 
field shows the list of avaible workspaces. If you want to

Modified: xfwm4/branches/xfce_4_4/src/client.c
===================================================================
--- xfwm4/branches/xfce_4_4/src/client.c        2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/src/client.c        2007-04-02 19:48:21 UTC (rev 
25372)
@@ -2603,9 +2603,19 @@
     TRACE ("entering clientActivate \"%s\" (0x%lx)", c->name, c->window);
 
     screen_info = c->screen_info;
-    if ((screen_info->current_ws == c->win_workspace) || 
(screen_info->params->bring_on_activate))
+    if ((screen_info->current_ws == c->win_workspace) || 
(screen_info->params->activate_action != ACTIVATE_ACTION_NONE))
     {
-        clientSetWorkspace (c, screen_info->current_ws, TRUE);
+        if (screen_info->current_ws != c->win_workspace)
+        {
+            if (screen_info->params->activate_action == ACTIVATE_ACTION_BRING)
+            {
+                clientSetWorkspace (c, screen_info->current_ws, TRUE);
+            }
+            else
+            {
+                workspaceSwitch (screen_info, c->win_workspace, NULL, FALSE, 
timestamp);
+            }
+        }
         clientShow (c, TRUE);
         clientClearAllShowDesktop (screen_info);
         clientSetFocus (screen_info, c, timestamp, NO_FOCUS_FLAG);

Modified: xfwm4/branches/xfce_4_4/src/events.c
===================================================================
--- xfwm4/branches/xfce_4_4/src/events.c        2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/src/events.c        2007-04-02 19:48:21 UTC (rev 
25372)
@@ -725,13 +725,13 @@
     {
         switch (screen_info->params->double_click_action)
         {
-            case ACTION_MAXIMIZE:
+            case DBL_CLICK_ACTION_MAXIMIZE:
                 clientToggleMaximized (c, WIN_STATE_MAXIMIZED, TRUE);
                 break;
-            case ACTION_SHADE:
+            case DBL_CLICK_ACTION_SHADE:
                 clientToggleShaded (c);
                 break;
-            case ACTION_HIDE:
+            case DBL_CLICK_ACTION_HIDE:
                 if (CLIENT_CAN_HIDE_WINDOW (c))
                 {
                     clientHide (c, c->win_workspace, TRUE);
@@ -1444,7 +1444,7 @@
             last_raised = clientGetLastRaise (screen_info);
             if (last_raised && (c != last_raised))
             {
-                if ((screen_info->params->prevent_focus_stealing) && 
!(screen_info->params->bring_on_activate))
+                if ((screen_info->params->prevent_focus_stealing) && 
(screen_info->params->activate_action == ACTIVATE_ACTION_NONE))
                 {
                     ev->value_mask &= ~(CWSibling | CWStackMode);
                     TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" 
(0x%lx)", c->name, c->window); 

Modified: xfwm4/branches/xfce_4_4/src/settings.c
===================================================================
--- xfwm4/branches/xfce_4_4/src/settings.c      2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/src/settings.c      2007-04-02 19:48:21 UTC (rev 
25372)
@@ -157,6 +157,26 @@
 }
 
 static void
+set_activate_action (ScreenInfo *screen_info, const char *value)
+{
+    g_return_if_fail (screen_info != NULL);
+    g_return_if_fail (value != NULL);
+
+    if (!g_ascii_strcasecmp ("bring", value))
+    {
+        screen_info->params->activate_action = ACTIVATE_ACTION_BRING;
+    }
+    else if (!g_ascii_strcasecmp ("switch", value))
+    {
+        screen_info->params->activate_action = ACTIVATE_ACTION_SWITCH;
+    }
+    else
+    {
+        screen_info->params->activate_action = ACTIVATE_ACTION_NONE;
+    }
+}
+
+static void
 notify_cb (const char *name, const char *channel_name, McsAction action, 
McsSetting * setting, void *data)
 {
     ScreenInfo *screen_info;
@@ -364,10 +384,6 @@
                         screen_info->params->borderless_maximize = 
setting->data.v_int;
                         reloadScreenSettings (screen_info, UPDATE_MAXIMIZE);
                     }
-                    else if (!strcmp (name, "Xfwm/BringOnActivate"))
-                    {
-                        screen_info->params->bring_on_activate = 
setting->data.v_int;
-                    }
                     else if (!strcmp (name, "Xfwm/CycleMinimum"))
                     {
                         screen_info->params->cycle_minimum = 
setting->data.v_int;
@@ -473,6 +489,10 @@
                     {
                         reloadScreenSettings (screen_info, 
UPDATE_BUTTON_GRABS);
                     }
+                    else if (!strcmp (name, "Xfwm/ActivateAction"))
+                    {
+                        set_activate_action (screen_info, 
setting->data.v_string);
+                    }
                 }
                 break;
             case MCS_ACTION_DELETED:
@@ -724,16 +744,16 @@
         }
 
         /* Tweaks channel */
-        if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/BorderlessMaximize", CHANNEL5,
+        if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/ActivateAction", CHANNEL5,
                 &setting) == MCS_SUCCESS)
         {
-            setBooleanValueFromInt ("borderless_maximize", 
setting->data.v_int, rc);
+            setValue ("activate_action", setting->data.v_string, rc);
             mcs_setting_free (setting);
         }
-        if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/BringOnActivate", CHANNEL5,
+        if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/BorderlessMaximize", CHANNEL5,
                 &setting) == MCS_SUCCESS)
         {
-            setBooleanValueFromInt ("bring_on_activate", setting->data.v_int, 
rc);
+            setBooleanValueFromInt ("borderless_maximize", 
setting->data.v_int, rc);
             mcs_setting_free (setting);
         }
         if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/CycleMinimum", CHANNEL5,
@@ -1275,6 +1295,7 @@
 gboolean
 loadSettings (ScreenInfo *screen_info)
 {
+    const gchar *value;
     Settings rc[] = {
         /* Do not change the order of the following parameters */
         {"active_text_color", NULL, FALSE},
@@ -1300,10 +1321,10 @@
         {"inactive_shadow_2", NULL, FALSE},
         {"inactive_mid_2", NULL, FALSE},
         /* You can change the order of the following parameters */
+        {"activate_action", NULL, TRUE},
         {"borderless_maximize", NULL, TRUE},
         {"box_move", NULL, TRUE},
         {"box_resize", NULL, TRUE},
-        {"bring_on_activate", NULL, TRUE},
         {"button_layout", NULL, TRUE},
         {"button_offset", NULL, TRUE},
         {"button_spacing", NULL, TRUE},
@@ -1446,8 +1467,6 @@
         !g_ascii_strcasecmp ("true", getValue ("box_resize", rc));
     screen_info->params->box_move =
         !g_ascii_strcasecmp ("true", getValue ("box_move", rc));
-    screen_info->params->bring_on_activate =
-        !g_ascii_strcasecmp ("true", getValue ("bring_on_activate", rc));
     screen_info->params->click_to_focus =
         !g_ascii_strcasecmp ("true", getValue ("click_to_focus", rc));
     screen_info->params->cycle_minimum =
@@ -1505,22 +1524,26 @@
     set_settings_margin (screen_info, STRUTS_TOP,    TOINT (getValue 
("margin_top", rc)));
 
     set_easy_click (screen_info, getValue ("easy_click", rc));
+    
+    value = getValue ("activate_action", rc);
+    set_activate_action (screen_info, value);
 
-    if (!g_ascii_strcasecmp ("shade", getValue ("double_click_action", rc)))
+    value = getValue ("double_click_action", rc);
+    if (!g_ascii_strcasecmp ("shade", value))
     {
-        screen_info->params->double_click_action = ACTION_SHADE;
+        screen_info->params->double_click_action = DBL_CLICK_ACTION_SHADE;
     }
-    else if (!g_ascii_strcasecmp ("hide", getValue ("double_click_action", 
rc)))
+    else if (!g_ascii_strcasecmp ("hide", value))
     {
-        screen_info->params->double_click_action = ACTION_HIDE;
+        screen_info->params->double_click_action = DBL_CLICK_ACTION_HIDE;
     }
-    else if (!g_ascii_strcasecmp ("maximize", getValue ("double_click_action", 
rc)))
+    else if (!g_ascii_strcasecmp ("maximize", value))
     {
-        screen_info->params->double_click_action = ACTION_MAXIMIZE;
+        screen_info->params->double_click_action = DBL_CLICK_ACTION_MAXIMIZE;
     }
     else
     {
-        screen_info->params->double_click_action = ACTION_NONE;
+        screen_info->params->double_click_action = DBL_CLICK_ACTION_NONE;
     }
 
     if (screen_info->workspace_count < 0)

Modified: xfwm4/branches/xfce_4_4/src/settings.h
===================================================================
--- xfwm4/branches/xfce_4_4/src/settings.h      2007-04-02 19:32:01 UTC (rev 
25371)
+++ xfwm4/branches/xfce_4_4/src/settings.h      2007-04-02 19:48:21 UTC (rev 
25372)
@@ -147,12 +147,19 @@
 
 enum
 {
-    ACTION_NONE,
-    ACTION_MAXIMIZE,
-    ACTION_SHADE,
-    ACTION_HIDE
+    ACTIVATE_ACTION_NONE,
+    ACTIVATE_ACTION_BRING,
+    ACTIVATE_ACTION_SWITCH
 };
 
+enum
+{
+    DBL_CLICK_ACTION_NONE,
+    DBL_CLICK_ACTION_MAXIMIZE,
+    DBL_CLICK_ACTION_SHADE,
+    DBL_CLICK_ACTION_HIDE
+};
+
 struct _XfwmColor
 {
     GdkColor col;
@@ -172,6 +179,7 @@
     MyKey keys[KEY_COUNT];
     gchar button_layout[BUTTON_COUNT + 1];
     unsigned int xfwm_margins[4];
+    int activate_action;
     int button_offset;
     int button_spacing;
     int double_click_action;
@@ -197,7 +205,6 @@
     gboolean borderless_maximize;
     gboolean box_move;
     gboolean box_resize;
-    gboolean bring_on_activate;
     gboolean click_to_focus;
     gboolean cycle_hidden;
     gboolean cycle_minimum;

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to