OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
10 #include <string> | 10 #include <string> |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // displayed title, which our app name certainly isn't. They don't have | 334 // displayed title, which our app name certainly isn't. They don't have |
335 // a dock or application based behaviour so do what looks good. | 335 // a dock or application based behaviour so do what looks good. |
336 gtk_window_set_wmclass(window_, | 336 gtk_window_set_wmclass(window_, |
337 wmclassname.c_str(), | 337 wmclassname.c_str(), |
338 gdk_get_program_class()); | 338 gdk_get_program_class()); |
339 } else { | 339 } else { |
340 // Most everything else uses the wmclass_class to group windows | 340 // Most everything else uses the wmclass_class to group windows |
341 // together (docks, per application stuff, etc). Hopefully they won't | 341 // together (docks, per application stuff, etc). Hopefully they won't |
342 // display wmclassname to the user. | 342 // display wmclassname to the user. |
343 gtk_window_set_wmclass(window_, | 343 gtk_window_set_wmclass(window_, |
344 g_get_prgname(), | 344 window_->wmclass_name, |
345 wmclassname.c_str()); | 345 wmclassname.c_str()); |
346 } | 346 } |
347 | 347 |
348 gtk_window_set_role(window_, wmclassname.c_str()); | 348 gtk_window_set_role(window_, wmclassname.c_str()); |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 // For popups, we initialize widgets then set the window geometry, because | 352 // For popups, we initialize widgets then set the window geometry, because |
353 // popups need the widgets inited before they can set the window size | 353 // popups need the widgets inited before they can set the window size |
354 // properly. For other windows, we set the geometry first to prevent resize | 354 // properly. For other windows, we set the geometry first to prevent resize |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 // special-case the ones where the custom frame should be used. These names | 2347 // special-case the ones where the custom frame should be used. These names |
2348 // are taken from the WMs' source code. | 2348 // are taken from the WMs' source code. |
2349 return (wm_name == "Blackbox" || | 2349 return (wm_name == "Blackbox" || |
2350 wm_name == "compiz" || | 2350 wm_name == "compiz" || |
2351 wm_name == "e16" || // Enlightenment DR16 | 2351 wm_name == "e16" || // Enlightenment DR16 |
2352 wm_name == "Metacity" || | 2352 wm_name == "Metacity" || |
2353 wm_name == "Mutter" || | 2353 wm_name == "Mutter" || |
2354 wm_name == "Openbox" || | 2354 wm_name == "Openbox" || |
2355 wm_name == "Xfwm4"); | 2355 wm_name == "Xfwm4"); |
2356 } | 2356 } |
OLD | NEW |