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

Unified Diff: src/views/unix/SkOSWindow_Unix.cpp

Issue 1181723006: Move closeWindow()/setFullscreen()/setVSynv() from SkWindow to SkOSWindow (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « include/views/SkWindow.h ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/unix/SkOSWindow_Unix.cpp
diff --git a/src/views/unix/SkOSWindow_Unix.cpp b/src/views/unix/SkOSWindow_Unix.cpp
index f7aaceef02f6f505bbb120f349d80e4566025dcd..79fd011fb23dbe7a4c7d7e0f02c9691bc84e4a22 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -456,10 +456,10 @@ enum {
_NET_WM_STATE_TOGGLE =2
};
-void SkOSWindow::setFullscreen(bool setFullscreen) {
+bool SkOSWindow::makeFullscreen() {
Display* dsp = fUnixWindow.fDisplay;
if (NULL == dsp) {
- return;
+ return false;
}
// Full screen
@@ -472,12 +472,13 @@ void SkOSWindow::setFullscreen(bool setFullscreen) {
evt.xclient.window = fUnixWindow.fWin;
evt.xclient.message_type = wm_state;
evt.xclient.format = 32;
- evt.xclient.data.l[0] = setFullscreen ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+ evt.xclient.data.l[0] = _NET_WM_STATE_ADD;
evt.xclient.data.l[1] = fullscreen;
evt.xclient.data.l[2] = 0;
XSendEvent(dsp, DefaultRootWindow(dsp), False,
SubstructureRedirectMask | SubstructureNotifyMask, &evt);
+ return true;
}
void SkOSWindow::setVsync(bool vsync) {
« no previous file with comments | « include/views/SkWindow.h ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698