~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to debian/patches/000_raise-on-click.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-03 22:44:28 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051003224428-ft31gkmz12qpzohj
Tags: 1:2.12.1-0ubuntu1
* New upstream release:
  - Thanks to Ray Strode, Havoc Pennington, and Elijah Newren for
    improvements in this release.
  - Truncate ridiculously long titles to avoid crashing or letting the
    pager crash (Ray, Havoc, Elijah) [#315070] (Ubuntu: #15995)
  - Get the tabbing window outline to work with gtk+ 2.8.4 again
    (Elijah) [#317528] (Ubuntu: #16589)
  - Translations: Mahay Alam Khan (bn), Francisco Javier F. Serrador (es), 
    Ivar Smolin (et), I\uffffaki Larra\uffffaga Murgoitio (eu), Luca 
    Ferretti (it), Christian Rose (sv), Clytie Siddall (vi), Funda 
    Wang (zh_CN)
* debian/control.in:
  - Bumped Standards-Version.
* debian/patches/003_bordersdrawingfix.patch:
  - dropped, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur metacity-2.11.0.orig/src/display.c metacity-2.11.0/src/display.c
 
2
--- metacity-2.11.0.orig/src/display.c  2005-07-12 21:20:32.000000000 +0200
 
3
+++ metacity-2.11.0/src/display.c       2005-07-13 11:35:05.000000000 +0200
 
4
@@ -1651,7 +1651,8 @@
 
5
                    * in click to focus mode? The debate rages.
 
6
                    * Feel free to change TRUE to FALSE or vice versa
 
7
                    */
 
8
-                  if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK */) 
 
9
+                  /* if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK )*/ 
 
10
+                 if(meta_prefs_get_raise_on_click ())
 
11
                     meta_window_raise (window);
 
12
                   else
 
13
                     meta_topic (META_DEBUG_FOCUS,
 
14
diff -Nur metacity-2.11.0.orig/src/metacity.schemas.in metacity-2.11.0/src/metacity.schemas.in
 
15
--- metacity-2.11.0.orig/src/metacity.schemas.in        2005-05-26 17:37:49.000000000 +0200
 
16
+++ metacity-2.11.0/src/metacity.schemas.in     2005-07-13 11:35:05.000000000 +0200
 
17
@@ -95,6 +95,20 @@
 
18
     </schema>
 
19
 
 
20
     <schema>
 
21
+      <key>/schemas/apps/metacity/general/raise_on_click</key>
 
22
+      <applyto>/apps/metacity/general/raise_on_click</applyto>
 
23
+      <owner>metacity</owner>
 
24
+      <type>bool</type>
 
25
+      <default>true</default>
 
26
+      <locale name="C">
 
27
+         <short>Raise current window if click event occurs</short>
 
28
+         <long>
 
29
+          If true the focused window will be automatically raised.
 
30
+         </long>
 
31
+      </locale>
 
32
+    </schema>
 
33
+
 
34
+    <schema>
 
35
       <key>/schemas/apps/metacity/general/auto_raise_delay</key>
 
36
       <applyto>/apps/metacity/general/auto_raise_delay</applyto>
 
37
       <owner>metacity</owner>
 
38
diff -Nur metacity-2.11.0.orig/src/prefs.c metacity-2.11.0/src/prefs.c
 
39
--- metacity-2.11.0.orig/src/prefs.c    2005-07-12 23:27:28.000000000 +0200
 
40
+++ metacity-2.11.0/src/prefs.c 2005-07-13 11:38:03.000000000 +0200
 
41
@@ -53,6 +53,7 @@
 
42
 #define KEY_BUTTON_LAYOUT "/apps/metacity/general/button_layout"
 
43
 #define KEY_REDUCED_RESOURCES "/apps/metacity/general/reduced_resources"
 
44
 #define KEY_GNOME_ACCESSIBILITY "/desktop/gnome/interface/accessibility"
 
45
+#define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click"
 
46
 
 
47
 #define KEY_COMMAND_PREFIX "/apps/metacity/keybinding_commands/command_"
 
48
 
 
49
@@ -92,6 +93,7 @@
 
50
 static gboolean bell_is_audible = TRUE;
 
51
 static gboolean reduced_resources = FALSE;
 
52
 static gboolean gnome_accessibility = FALSE;
 
53
+static gboolean raise_on_click = FALSE;
 
54
 static char *cursor_theme = NULL;
 
55
 static int   cursor_size = 24;
 
56
 
 
57
@@ -132,6 +134,7 @@
 
58
 static gboolean update_action_double_click_titlebar (const char *value);
 
59
 static gboolean update_auto_raise          (gboolean   value);
 
60
 static gboolean update_auto_raise_delay    (int        value);
 
61
+static gboolean update_raise_on_click     (gboolean    value);
 
62
 static gboolean update_button_layout      (const char *value);
 
63
 static gboolean update_window_binding     (const char *name,
 
64
                                            const char *value);
 
65
@@ -307,7 +310,7 @@
 
66
   char *str_val;
 
67
   int int_val;
 
68
   gboolean bool_val, bool_val_2;
 
69
-  
 
70
+   
 
71
   if (default_client != NULL)
 
72
     return;
 
73
   
 
74
@@ -363,7 +366,11 @@
 
75
   cleanup_error (&err);
 
76
   update_auto_raise_delay (int_val);
 
77
   
 
78
-
 
79
+  bool_val = gconf_client_get_bool (default_client, KEY_RAISE_ON_CLICK,
 
80
+                 &err);
 
81
+  cleanup_error (&err);
 
82
+  update_raise_on_click (bool_val);                 
 
83
+  
 
84
   str_val = gconf_client_get_string (default_client, KEY_THEME,
 
85
                                      &err);
 
86
   cleanup_error (&err);
 
87
@@ -732,6 +739,22 @@
 
88
         queue_changed (META_PREF_AUTO_RAISE_DELAY);
 
89
     
 
90
     }
 
91
+  else if (strcmp (key, KEY_RAISE_ON_CLICK) == 0)
 
92
+    {
 
93
+      gboolean b;
 
94
+
 
95
+      if (value && value->type != GCONF_VALUE_BOOL)
 
96
+        {
 
97
+          meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
 
98
+                        KEY_RAISE_ON_CLICK);
 
99
+          goto out;
 
100
+        }
 
101
+
 
102
+      b = value ? gconf_value_get_bool (value) : raise_on_click;
 
103
+
 
104
+      if (update_raise_on_click (b))
 
105
+        queue_changed (META_PREF_RAISE_ON_CLICK);
 
106
+    }    
 
107
   else if (str_has_prefix (key, KEY_COMMAND_PREFIX))
 
108
     {
 
109
       const char *str;
 
110
@@ -1443,6 +1466,16 @@
 
111
   return old != auto_raise;
 
112
 }
 
113
 
 
114
+static gboolean
 
115
+update_raise_on_click (gboolean value)
 
116
+{
 
117
+  gboolean old = raise_on_click;
 
118
+
 
119
+  raise_on_click = value;
 
120
+
 
121
+  return old != raise_on_click;
 
122
+}
 
123
+
 
124
 #define MAX_REASONABLE_AUTO_RAISE_DELAY 10000
 
125
   
 
126
 static gboolean
 
127
@@ -1523,6 +1556,9 @@
 
128
     case META_PREF_AUTO_RAISE:
 
129
       return "AUTO_RAISE";
 
130
       
 
131
+    case META_PREF_RAISE_ON_CLICK:
 
132
+      return "RAISE_ON_CLICK";
 
133
+      
 
134
     case META_PREF_AUTO_RAISE_DELAY:
 
135
       return "AUTO_RAISE_DELAY";
 
136
 
 
137
@@ -2259,6 +2295,12 @@
 
138
   return auto_raise;
 
139
 }
 
140
 
 
141
+gboolean
 
142
+meta_prefs_get_raise_on_click ()
 
143
+{
 
144
+       return raise_on_click;
 
145
+}
 
146
+
 
147
 int
 
148
 meta_prefs_get_auto_raise_delay (void)
 
149
 {
 
150
diff -Nur metacity-2.11.0.orig/src/prefs.h metacity-2.11.0/src/prefs.h
 
151
--- metacity-2.11.0.orig/src/prefs.h    2005-07-12 23:27:28.000000000 +0200
 
152
+++ metacity-2.11.0/src/prefs.h 2005-07-13 11:38:36.000000000 +0200
 
153
@@ -49,8 +49,9 @@
 
154
   META_PREF_VISUAL_BELL_TYPE,
 
155
   META_PREF_REDUCED_RESOURCES,
 
156
   META_PREF_GNOME_ACCESSIBILITY,
 
157
+  META_PREF_RAISE_ON_CLICK,
 
158
   META_PREF_CURSOR_THEME,
 
159
-  META_PREF_CURSOR_SIZE
 
160
+  META_PREF_CURSOR_SIZE,
 
161
 } MetaPreference;
 
162
 
 
163
 typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
 
164
@@ -76,6 +77,7 @@
 
165
 int                         meta_prefs_get_auto_raise_delay   (void);
 
166
 gboolean                    meta_prefs_get_reduced_resources  (void);
 
167
 gboolean                    meta_prefs_get_gnome_accessibility (void);
 
168
+gboolean                    meta_prefs_get_raise_on_click     (void);
 
169
 
 
170
 const char*                 meta_prefs_get_command            (int i);
 
171