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

Unified Diff: chrome/browser/ui/gtk/apps/native_app_window_gtk.cc

Issue 59873006: NativeAppWindowGtk: only notify change when the window state actually changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
diff --git a/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc b/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
index 1010390215b3b916294c56cdb4d0ac7ecfa00253..56d4f5f3966c75251225e808c66cc0deb7ce9161 100644
--- a/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
+++ b/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
@@ -330,12 +330,13 @@ GdkFilterReturn NativeAppWindowGtk::OnXEvent(GdkXEvent* gdk_x_event,
atom_list.end(),
atom_cache_.GetAtom("_NET_WM_STATE_HIDDEN"));
+ GdkWindowState previous_state = state_;
state_ = (it != atom_list.end()) ? GDK_WINDOW_STATE_ICONIFIED :
static_cast<GdkWindowState>(state_ & ~GDK_WINDOW_STATE_ICONIFIED);
- // TODO(mlamouri): we don't need to send a change event all the time here.
- // Only when |state_| has actually changed.
- shell_window_->OnNativeWindowChanged();
+ if (previous_state != state_) {
+ shell_window_->OnNativeWindowChanged();
+ }
}
return GDK_FILTER_CONTINUE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698