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

Unified Diff: chrome/views/widget/widget_win.h

Issue 67023: Fix various problems with work area change notifications so that we now (hope... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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 | « no previous file | chrome/views/widget/widget_win.cc » ('j') | chrome/views/widget/widget_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/widget/widget_win.h
===================================================================
--- chrome/views/widget/widget_win.h (revision 12889)
+++ chrome/views/widget/widget_win.h (working copy)
@@ -457,9 +457,7 @@
virtual void OnVScroll(int scroll_type, short position, HWND scrollbar) {
SetMsgHandled(FALSE);
}
- virtual void OnWindowPosChanging(WINDOWPOS* window_pos) {
- SetMsgHandled(FALSE);
- }
+ virtual void OnWindowPosChanging(WINDOWPOS* window_pos);
virtual void OnWindowPosChanged(WINDOWPOS* window_pos) {
SetMsgHandled(FALSE);
}
@@ -485,10 +483,6 @@
void ProcessMouseMoved(const CPoint& point, UINT flags, bool is_nonclient);
void ProcessMouseExited();
- // Makes sure the window still fits on screen after a settings change message
- // from the OS, e.g. a screen resolution change.
- virtual void AdjustWindowToFitScreenSize();
-
// Handles re-laying out content in response to a window size change.
virtual void ChangeSize(UINT size_param, const CSize& size);
@@ -543,10 +537,17 @@
// If necessary, this registers the window class.
std::wstring GetWindowClassName();
+ // Stops ignoring SetWindowPos() requests (see below).
+ void StopIgnoringPosChanges() { ignore_window_pos_changes_ = false; }
+
// The following factory is used for calls to close the WidgetWin
// instance.
ScopedRunnableMethodFactory<WidgetWin> close_widget_factory_;
+ // The following factory is used to ignore SetWindowPos() calls for short time
+ // periods.
+ ScopedRunnableMethodFactory<WidgetWin> ignore_pos_changes_factory_;
+
// The flags currently being used with TrackMouseEvent to track mouse
// messages. 0 if there is no active tracking. The value of this member is
// used when tracking is canceled.
@@ -611,6 +612,16 @@
// Our hwnd.
HWND hwnd_;
+
+ // The last-seen monitor containing us, and its work area. These are used to
+ // catch updates to the work area and react accordingly.
+ HMONITOR last_monitor_;
+ gfx::Rect last_work_area_;
+
+ // When true, this flag makes us discard incoming SetWindowPos() requests that
+ // only change our position/size. (We still allow changes to Z-order,
+ // activation, etc.)
+ bool ignore_window_pos_changes_;
};
} // namespace views
« no previous file with comments | « no previous file | chrome/views/widget/widget_win.cc » ('j') | chrome/views/widget/widget_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698