Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: chrome/browser/ui/gtk/panels/panel_gtk.cc

Issue 16294002: Make docked panel always on top for Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/panels/panel_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/panels/panel_gtk.cc
diff --git a/chrome/browser/ui/gtk/panels/panel_gtk.cc b/chrome/browser/ui/gtk/panels/panel_gtk.cc
index 8118748bdcf33b2eec67e8dc7c3fce646c29be54..a3acd7b09626cf75ec0014ef50bff6947faffe24 100644
--- a/chrome/browser/ui/gtk/panels/panel_gtk.cc
+++ b/chrome/browser/ui/gtk/panels/panel_gtk.cc
@@ -316,6 +316,8 @@ void PanelGtk::Init() {
gtk_widget_show(window_container_);
ConnectAccelerators();
+
+ UpdateWindowAlwaysOnTopState();
}
void PanelGtk::SetWindowCornerStyle(panel::CornerStyle corner_style) {
@@ -1010,15 +1012,19 @@ void PanelGtk::SetPanelAlwaysOnTop(bool on_top) {
return;
always_on_top_ = on_top;
- gtk_window_set_keep_above(window_, on_top);
+ UpdateWindowAlwaysOnTopState();
+}
+
+void PanelGtk::UpdateWindowAlwaysOnTopState() {
+ gtk_window_set_keep_above(window_, always_on_top_);
// Do not show an icon in the task bar for always-on-top windows.
// Window operations such as close, minimize etc. can only be done
// from the panel UI.
- gtk_window_set_skip_taskbar_hint(window_, on_top);
+ gtk_window_set_skip_taskbar_hint(window_, always_on_top_);
// Show always-on-top windows on all the virtual desktops.
- if (on_top)
+ if (always_on_top_)
gtk_window_stick(window_);
else
gtk_window_unstick(window_);
« no previous file with comments | « chrome/browser/ui/gtk/panels/panel_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698