#include <string>
#include <vector>
-#include "base/values.h"
-#include "chrome/browser/ui/gtk/gtk_window_util.h"
#include "atom/common/draggable_region.h"
#include "atom/common/options_switches.h"
+#include "base/values.h"
+#include "chrome/browser/ui/gtk/gtk_window_util.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/common/renderer_preferences.h"
int width = 800, height = 600;
options->GetInteger(switches::kWidth, &width);
options->GetInteger(switches::kHeight, &height);
- gtk_window_set_default_size(window_, width, height);
+ SetSize(gfx::Size(width, height));
if (!icon_.IsEmpty())
gtk_window_set_icon(window_, icon_.ToGdkPixbuf());
void NativeWindowGtk::Move(const gfx::Rect& pos) {
gtk_window_move(window_, pos.x(), pos.y());
- gtk_window_resize(window_, pos.width(), pos.height());
+ SetSize(pos.size());
}
void NativeWindowGtk::Focus(bool focus) {
}
void NativeWindowGtk::SetSize(const gfx::Size& size) {
- gtk_window_resize(window_, size.width(), size.height());
+ gtk_window_util::SetWindowSize(window_, size);
}
gfx::Size NativeWindowGtk::GetSize() {