View | Details | Raw Unified | Return to bug 457787
Collapse All | Expand All

(-)Monitor.cs (-8 / +24 lines)
Lines 60-78 Link Here
60
			RegisterSignal (typeof (Atk.Object), "resize");
60
			RegisterSignal (typeof (Atk.Object), "resize");
61
			RegisterSignal (typeof (Atk.Object), "restore");
61
			RegisterSignal (typeof (Atk.Object), "restore");
62
		}
62
		}
63
64
		string gtk_modules_envvar_content = null;
65
		string gtk_modules_envvar_name = "GTK_MODULES";
66
		
63
		
67
		internal Monitor ()
64
		internal Monitor ()
68
		{
65
		{
69
			GLib.GType.Init();
66
			GLib.GType.Init();
70
67
71
			// we need to set this because MWF happens to depend on gtk+ (this may change on the future)
68
			PreventGailInitialization ();
72
			// https://bugzilla.novell.com/show_bug.cgi?id=375987
69
73
			gtk_modules_envvar_content = Environment.GetEnvironmentVariable (gtk_modules_envvar_name);
74
			Environment.SetEnvironmentVariable (gtk_modules_envvar_name, String.Empty);
75
			
76
			Atk.Util.GetRootHandler = ReturnTopLevel;
70
			Atk.Util.GetRootHandler = ReturnTopLevel;
77
			
71
			
78
			Atk.Util.GetToolkitNameHandler = GetAssemblyName;
72
			Atk.Util.GetToolkitNameHandler = GetAssemblyName;
Lines 85-90 Link Here
85
			Atk.Util.AddKeyEventListenerHandler = AddKeyEventListener;
79
			Atk.Util.AddKeyEventListenerHandler = AddKeyEventListener;
86
		}
80
		}
87
81
82
		string gtk_modules_envvar_content = null;
83
		string gtk_modules_envvar_name = "GTK_MODULES";
84
		string atk_bridge_envvar_name = "NO_AT_BRIDGE";
85
		string gail_envvar_name = "NO_GAIL";
86
		
87
		// we need to set this because MWF happens to depend on gtk+ (this may change on the future)
88
		void PreventGailInitialization ()
89
		{
90
			// Solution for gtk+ < 2.14:
91
			// (A better solution would probably be to get these
92
			//  values out-of-process.  See details/discussion here:
93
			//  https://bugzilla.novell.com/show_bug.cgi?id=375987 )
94
			gtk_modules_envvar_content = Environment.GetEnvironmentVariable (gtk_modules_envvar_name);
95
			Environment.SetEnvironmentVariable (gtk_modules_envvar_name, String.Empty);
96
97
			// Solution for gtk+ >= 2.14
98
			// see https://bugzilla.novell.com/show_bug.cgi?id=457787
99
			Environment.SetEnvironmentVariable (atk_bridge_envvar_name, "1");
100
			Environment.SetEnvironmentVariable (gail_envvar_name, "1");
101
		}
102
		
88
		private bool isApplicationStarted = false;
103
		private bool isApplicationStarted = false;
89
		
104
		
90
		public void ApplicationStarts ()
105
		public void ApplicationStarts ()
Lines 96-101 Link Here
96
			AutoResetEvent sync = GLibHacks.Invoke (delegate (object sender, EventArgs args) {
111
			AutoResetEvent sync = GLibHacks.Invoke (delegate (object sender, EventArgs args) {
97
				RegisterWindowSignals ();
112
				RegisterWindowSignals ();
98
113
114
				Environment.SetEnvironmentVariable (atk_bridge_envvar_name, "0");
99
				LaunchAtkBridge ();
115
				LaunchAtkBridge ();
100
			});
116
			});
101
			sync.WaitOne ();
117
			sync.WaitOne ();

Return to bug 457787