Skip to content

Commit

Permalink
Bug 996493 - Implement MaxTouchPoints for Windows widget. r=jimm
Browse files Browse the repository at this point in the history
  • Loading branch information
makotokato committed May 14, 2014
1 parent 08b4e51 commit c47590e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions widget/windows/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3589,6 +3589,15 @@ nsWindow::UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries)
}
}

uint32_t
nsWindow::GetMaxTouchPoints() const
{
if (IsWin7OrLater()) {
return GetSystemMetrics(SM_MAXIMUMTOUCHES);
}
return 0;
}

/**************************************************************
**************************************************************
**
Expand Down
1 change: 1 addition & 0 deletions widget/windows/nsWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class nsWindow : public nsWindowBase
virtual void EndRemoteDrawing() MOZ_OVERRIDE;

virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) MOZ_OVERRIDE;
virtual uint32_t GetMaxTouchPoints() const MOZ_OVERRIDE;

/**
* Event helpers
Expand Down
5 changes: 5 additions & 0 deletions widget/windows/nsWindowDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
#define SM_CXPADDEDBORDER 92
#endif

// require WINVER >= 0x601
#ifndef SM_MAXIMUMTOUCHES
#define SM_MAXIMUMTOUCHES 95
#endif

#ifndef WM_THEMECHANGED
#define WM_THEMECHANGED 0x031A
#endif
Expand Down

0 comments on commit c47590e

Please sign in to comment.