Fix building on Windows
This commit is contained in:
parent
8d3e09747a
commit
381689d3ed
6 changed files with 15 additions and 13 deletions
|
@ -19,7 +19,6 @@
|
||||||
#include "base/win/windows_version.h"
|
#include "base/win/windows_version.h"
|
||||||
#include "content/public/app/sandbox_helper_win.h"
|
#include "content/public/app/sandbox_helper_win.h"
|
||||||
#include "sandbox/win/src/sandbox_types.h"
|
#include "sandbox/win/src/sandbox_types.h"
|
||||||
#include "ui/gfx/win/dpi.h"
|
|
||||||
#elif defined(OS_LINUX) // defined(OS_WIN)
|
#elif defined(OS_LINUX) // defined(OS_WIN)
|
||||||
#include "atom/app/atom_main_delegate.h" // NOLINT
|
#include "atom/app/atom_main_delegate.h" // NOLINT
|
||||||
#include "content/public/app/content_main.h"
|
#include "content/public/app/content_main.h"
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
|
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
|
||||||
#include "skia/ext/skia_utils_win.h"
|
#include "skia/ext/skia_utils_win.h"
|
||||||
#include "ui/base/win/shell.h"
|
#include "ui/base/win/shell.h"
|
||||||
#include "ui/gfx/win/dpi.h"
|
#include "ui/display/win/screen_win.h"
|
||||||
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1093,9 +1093,11 @@ gfx::Size NativeWindowViews::ContentSizeToWindowSize(const gfx::Size& size) {
|
||||||
|
|
||||||
gfx::Size window_size(size);
|
gfx::Size window_size(size);
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
gfx::Rect dpi_bounds =
|
HWND hwnd = GetAcceleratedWidget();
|
||||||
gfx::Rect(gfx::Point(), gfx::win::DIPToScreenSize(size));
|
gfx::Rect dpi_bounds = gfx::Rect(
|
||||||
gfx::Rect window_bounds = gfx::win::ScreenToDIPRect(
|
gfx::Point(), display::win::ScreenWin::DIPToScreenSize(hwnd, size));
|
||||||
|
gfx::Rect window_bounds = display::win::ScreenWin::ScreenToDIPRect(
|
||||||
|
hwnd,
|
||||||
window_->non_client_view()->GetWindowBoundsForClientBounds(dpi_bounds));
|
window_->non_client_view()->GetWindowBoundsForClientBounds(dpi_bounds));
|
||||||
window_size = window_bounds.size();
|
window_size = window_bounds.size();
|
||||||
#endif
|
#endif
|
||||||
|
@ -1111,16 +1113,16 @@ gfx::Size NativeWindowViews::WindowSizeToContentSize(const gfx::Size& size) {
|
||||||
|
|
||||||
gfx::Size content_size(size);
|
gfx::Size content_size(size);
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
content_size = gfx::win::DIPToScreenSize(content_size);
|
HWND hwnd = GetAcceleratedWidget();
|
||||||
|
content_size = display::win::ScreenWin::DIPToScreenSize(hwnd, content_size);
|
||||||
RECT rect;
|
RECT rect;
|
||||||
SetRectEmpty(&rect);
|
SetRectEmpty(&rect);
|
||||||
HWND hwnd = GetAcceleratedWidget();
|
|
||||||
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
|
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
|
||||||
DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||||
AdjustWindowRectEx(&rect, style, FALSE, ex_style);
|
AdjustWindowRectEx(&rect, style, FALSE, ex_style);
|
||||||
content_size.set_width(content_size.width() - (rect.right - rect.left));
|
content_size.set_width(content_size.width() - (rect.right - rect.left));
|
||||||
content_size.set_height(content_size.height() - (rect.bottom - rect.top));
|
content_size.set_height(content_size.height() - (rect.bottom - rect.top));
|
||||||
content_size = gfx::win::ScreenToDIPSize(content_size);
|
content_size = display::win::ScreenWin::ScreenToDIPSize(hwnd, content_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (menu_bar_ && menu_bar_visible_)
|
if (menu_bar_ && menu_bar_visible_)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "ui/gfx/geometry/point.h"
|
#include "ui/gfx/geometry/point.h"
|
||||||
#include "ui/gfx/geometry/rect.h"
|
#include "ui/gfx/geometry/rect.h"
|
||||||
#include "ui/display/screen.h"
|
#include "ui/display/screen.h"
|
||||||
#include "ui/gfx/win/dpi.h"
|
#include "ui/display/win/screen_win.h"
|
||||||
#include "ui/views/controls/menu/menu_runner.h"
|
#include "ui/views/controls/menu/menu_runner.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
@ -167,7 +167,7 @@ gfx::Rect NotifyIcon::GetBounds() {
|
||||||
|
|
||||||
RECT rect = { 0 };
|
RECT rect = { 0 };
|
||||||
Shell_NotifyIconGetRect(&icon_id, &rect);
|
Shell_NotifyIconGetRect(&icon_id, &rect);
|
||||||
return gfx::win::ScreenToDIPRect(gfx::Rect(rect));
|
return display::win::ScreenWin::ScreenToDIPRect(window_, gfx::Rect(rect));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) {
|
void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
|
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
|
||||||
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
|
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ class PdfToEmfUtilityProcessHostClient
|
||||||
|
|
||||||
// UtilityProcessHostClient implementation.
|
// UtilityProcessHostClient implementation.
|
||||||
virtual void OnProcessCrashed(int exit_code) override;
|
virtual void OnProcessCrashed(int exit_code) override;
|
||||||
virtual void OnProcessLaunchFailed() override;
|
virtual void OnProcessLaunchFailed(int exit_code) override;
|
||||||
virtual bool OnMessageReceived(const IPC::Message& message) override;
|
virtual bool OnMessageReceived(const IPC::Message& message) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -423,7 +423,7 @@ void PdfToEmfUtilityProcessHostClient::OnProcessCrashed(int exit_code) {
|
||||||
OnFailed();
|
OnFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PdfToEmfUtilityProcessHostClient::OnProcessLaunchFailed() {
|
void PdfToEmfUtilityProcessHostClient::OnProcessLaunchFailed(int exit_code) {
|
||||||
OnFailed();
|
OnFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import sys
|
||||||
|
|
||||||
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
|
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
|
||||||
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
|
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
|
||||||
LIBCHROMIUMCONTENT_COMMIT = '1dd3cbf7c4d3cc6511fa1a2a145b0e9cd86752b6'
|
LIBCHROMIUMCONTENT_COMMIT = 'e078493ea80ebf66f4b2c6dd4cadd1b529228da6'
|
||||||
|
|
||||||
PLATFORM = {
|
PLATFORM = {
|
||||||
'cygwin': 'win32',
|
'cygwin': 'win32',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue