Commit graph

377 commits

Author SHA1 Message Date
Heilig Benedek
276e12ce71 pass on web_contents to properly handle devtools 2017-11-13 15:50:50 +09:00
Heilig Benedek
4b10445c2e lint fix 2017-11-13 15:50:49 +09:00
Heilig Benedek
193beb57c9 fix datalist element popup position when menu is hidden 2017-11-13 15:50:49 +09:00
Heilig Benedek
f8b3009ebf restructure code to use web_preferences if possible 2017-11-13 15:50:49 +09:00
Heilig Benedek
71b36ef54d don't show the dummy window for the rest of the dialogs too on mac 2017-11-13 15:46:46 +09:00
Heilig Benedek
e39aacb30e fix a bug that caused a crash when using an offscreen window with detached devtools, related to autofill popups 2017-11-13 15:46:46 +09:00
Taeho Kim
7570ec9d39 Add BrowserWindow.getOpacity for consistency 2017-10-03 00:08:10 +09:00
Taeho Kim
7df5182901 Fix lint 2017-10-02 09:52:27 +09:00
Ted Kim
7f2c4a9e06 Add window opacity support 2017-09-29 17:49:10 +09:00
Birunthan Mohanathas
e1ddd3bdbc Stop sending resize event for minimized windows on Windows
This makes it consistent with macOS.

This also fixes BrowserView auto-resize on Windows when minimizing and
restoring the window. Previously it would incorrectly grow too in some
cases.
2017-09-25 11:44:32 +09:00
Birunthan Mohanathas
f3f6bedf8e Make BrowserView auto-resize relative to window size on Windows/Linux
Previously it was relative to the window web contents size, which was
not consistent with macOS.
2017-09-25 11:44:32 +09:00
Cheng Zhao
a19a229a59 Merge pull request #10254 from zachflower/feature/simple-fullscreen-mode
Feature/simple fullscreen mode
2017-09-14 09:39:50 +09:00
Cheng Zhao
70fd42808e Fix build on Linux 2017-08-21 17:42:45 +09:00
Cheng Zhao
19323c88f9 win: Fix "thickFrame: false" not working for normal window 2017-08-21 17:21:59 +09:00
Cheng Zhao
f908678e8e Merge pull request #10183 from andens/mouse_forward
Mouse forward functionality on Windows
2017-08-17 15:54:22 +09:00
Andreas Flöjt
814702f5b8 Cleanup potential mouse forwarding resources when window is destroyed. 2017-08-16 03:28:07 +02:00
Kevin Sawicki
4bb95acc2b 👕 Remove linter errors 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
627eb30409 The Blink Rename 2017-08-15 16:19:21 +03:00
Andreas Flöjt
3d33da7696 Make mouse forward option of setIgnoreMouseMessages and update documentation. 2017-08-14 20:21:00 +02:00
Andreas Flöjt
60c0bf1636 Set up legacy window subclass and mouse hook during setForwardMouseMessages.
As opposed to when a legacy window is created/destroyed. This enables forwarding on a per-window basis.
2017-08-14 18:12:55 +02:00
Zachary Flower
ba5fa2c8b1 Add support for simple (pre-Lion) fullscreen on Mac OS 2017-08-13 00:28:33 -06:00
Andreas Flöjt
a84fa0eecb 🏁 Add API to forward mouse messages.
As opposed to the existing setIgnoreMouseEvents this call makes Chromium aware of mouse movements, allowing the user to stop forwarding according to movements in the webpage.
2017-08-02 21:16:37 +02:00
Vladimir Vainer
06b5acdac0 Fix #8768: Show() on already open modal
Calling show() on an already open modal causes the parent to become unusable
2017-07-09 06:49:12 +03:00
dharders
112f4656c3 👕 fix lint warning 2017-06-14 11:30:33 +10:00
dharders
265ab45bd7 🎨 Reuse existing function 2017-06-14 11:05:39 +10:00
dharders
4c09b357a7 🏁 Fix #6036. Ensure window is visible after fullscreen toggle 2017-06-01 14:38:51 +10:00
Heilig Benedek
192cd7787b move popup related code to nativewindow 2017-05-26 03:39:36 +02:00
Heilig Benedek
d5c038a7fb ci build fix 2017-05-21 20:57:19 +02:00
Heilig Benedek
20d2ab29ab Add support for child and popup windows in OSR 2017-05-10 22:19:05 +02:00
Cheng Zhao
b3d60bfb3a Fix building on Linux 2017-04-27 16:34:52 +09:00
Cheng Zhao
6be10ffef2 Fix more API changes due to name changes 2017-04-27 16:34:52 +09:00
Cheng Zhao
50e3bfa764 Fix API changes of base::Value 2017-04-27 16:34:52 +09:00
Birunthan Mohanathas
dcf6c52f51 Actually hide menubar area when menu is autohidden
This was a regression introduced in 638eae10.
2017-04-17 12:31:39 +03:00
Kevin Sawicki
fe8726d775 Use Chrome default client inset handling 2017-04-13 13:03:46 +03:00
Birunthan Mohanathas
06fcf2c19d Add support for BrowserView autoresizing 2017-04-13 01:27:31 +03:00
Birunthan Mohanathas
638eae1080 Remove MenuLayout in favor of NativeWindowViews::Layout 2017-04-13 01:27:31 +03:00
Birunthan Mohanathas
8b9f7e5b00 Implement initial, experimental BrowserView API
Right now, `<webview>` is the only way to embed additional content in a
`BrowserWindow`. Unfortunately `<webview>` suffers from a [number of
problems](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Awebview%20).
To make matters worse, many of these are upstream Chromium bugs instead
of Electron-specific bugs.

For us at [Figma](https://www.figma.com), the main issue is very slow
performance.

Despite the upstream improvements to `<webview>` through the OOPIF work, it is
probable that there will continue to be `<webview>`-specific bugs in the
future.

Therefore, this introduces a `<webview>` alternative to called `BrowserView`,
which...

- is a thin wrapper around `api::WebContents` (so bugs in `BrowserView` will
  likely also be bugs in `BrowserWindow` web contents)

- is instantiated in the main process like `BrowserWindow` (and unlike
  `<webview>`, which lives in the DOM of a `BrowserWindow` web contents)

- needs to be added to a `BrowserWindow` to display something on the screen

This implements the most basic API. The API is expected to evolve and change in
the near future and has consequently been marked as experimental. Please do not
use this API in production unless you are prepared to deal with breaking
changes.

In the future, we will want to change the API to support multiple
`BrowserView`s per window. We will also want to consider z-ordering
auto-resizing, and possibly even nested views.
2017-04-13 01:27:27 +03:00
Kevin Sawicki
52801c4a41 Use internal IsVisible method 2017-02-15 08:28:55 -08:00
Kevin Sawicki
db79f4f450 Implement Activate instead of CanFocus 2017-02-15 08:28:55 -08:00
Kevin Sawicki
bda8af8dd3 Just use visible state in CanFocus delegate 2017-02-15 08:28:55 -08:00
Kevin Sawicki
be79417a03 Include CanFocus on Windows and map to state 2017-02-15 08:28:55 -08:00
Kevin Sawicki
643cb5d6de Remove unused variable 2017-02-14 11:13:23 -08:00
Kevin Sawicki
82f452568c 🎨 Minor formatting tweaks 2017-02-14 11:09:15 -08:00
Gary Wilber
f19924bcb0 Add Invalidate method to NativeWindow and add Mac implementation 2017-02-13 19:41:24 -08:00
Cheng Zhao
be29ea4dad libgtk2ui => libgtkui 2017-02-06 10:34:29 -08:00
leethomas
1f5518b91e throw an error for out of bounds window levels 2017-01-24 20:14:09 -08:00
leethomas
7a0a87a6f3 implement relative window levels, closes #8153 2017-01-23 23:42:33 -08:00
Kevin Sawicki
e82b41724d Restore thick frame full screen case 2017-01-18 14:40:42 -08:00
Kevin Sawicki
e5aad9857d Merge pull request #7765 from liusy182/maximize-fix
fix for Window hidden behind taskbar after maximize #7672
2017-01-09 09:47:39 -08:00
liusi
b853671132 fix fullscreen, maximize, unmaximize 2016-12-15 14:01:03 +08:00
Samuel Attard
c65033a13b
Revert "incorrect position when restored from maximize-on-top-drag under Windows #7630"
This reverts commit a2b3abbf47.
2016-11-22 15:49:56 +11:00
liusi
00d9baa605 fix linting error 2016-11-15 13:23:59 +08:00
liusi
356d0520ae fix linting error 2016-11-11 17:57:22 +08:00
liusi
a69ee76705 fix review comments 2016-11-08 15:36:37 +08:00
liusi
0e9d973715 toggle thick_frame_ along with resizable change 2016-11-03 12:13:06 +08:00
liusi
7880d37d73 merge changes from master 2016-11-01 10:20:47 +08:00
Cheng Zhao
92f8c105d9 Merge pull request #7766 from liusy182/window-size-restore
incorrect position when restored from maximize-on-top-drag under Windows #7630
2016-10-31 11:04:35 +09:00
liusy182
c657186920 address review comments 2016-10-30 09:50:22 +08:00
liusi
a2b3abbf47 incorrect position when restored from maximize-on-top-drag under Windows #7630 2016-10-27 17:42:43 +08:00
liusi
c61414e11b fix for Window hidden behind taskbar after maximize #7672 2016-10-27 17:14:31 +08:00
Kevin Sawicki
98387e50cc Focus window on menu bar click 2016-10-24 11:49:51 +09:00
Paul Betts
6fdf40b038 Code Cleanup 2016-10-14 12:17:32 -07:00
Cheng Zhao
4d8c1c61a5 Revert "Fix for issues seen on frameless window (Windows) when at 200% resolution" 2016-10-03 20:41:52 +09:00
Brian Clifton
52340b43f5 Possible fix for issues seen on frameless window (Windows) when at 200% 2016-09-29 10:48:36 -07:00
Kevin Sawicki
c336cf59c1 Ignore level when calling SetAlwaysOnTop on Widget 2016-09-22 09:38:04 -07:00
adammeyer
783d47f78b custom window level as string 2016-09-21 22:49:06 -04:00
adammeyer
fbb3a288ec Allow custom window level when sending window to top 2016-09-21 13:35:59 -04:00
Kevin Sawicki
6285500cdc Sort includes alphabetically 2016-08-26 15:30:02 -07:00
Kevin Sawicki
459c80da4e Only change window state when fullscreen is true 2016-08-24 14:30:29 -07:00
Cheng Zhao
06d2dfe119 Merge pull request #6788 from electron/felix-progress-enum
Use enum to declare ProgressState
2016-08-18 14:35:00 +09:00
Samuel Attard
2fa7aa3c71 Save the thumbar buttons when setting them
Then restore the buttons when restoring the taskbar icon
2016-08-13 01:55:42 +10:00
Felix Rieseberg
8b85ee8a20 🔧 Use enum to declare ProgressState
As recommended in #6768, this commit adds an enum for progress states for windows.
2016-08-10 08:56:26 -07:00
Cheng Zhao
dd79c71302 Style fixes for SetProgressBar 2016-08-09 21:02:14 +09:00
Felix Rieseberg
73c91dae9e 🔧 Enable mode indication for setProgressBar
This commit enables setting a mode for the setProgressBar method.
Old behavior is kept intact, usage is entirely optional.
2016-08-08 15:52:20 -07:00
Kevin Sawicki
dbddf5028a Adjust y position if menu bar is visible 2016-08-04 13:18:58 -07:00
Kevin Sawicki
a190495df3 Use bounds for converting window/content sizes 2016-08-04 11:27:27 -07:00
Kevin Sawicki
4751f971e2 Use View::GetBoundsInScreen to compute content bounds 2016-08-04 09:58:36 -07:00
Kevin Sawicki
4f90abce23 Set bounds size to content size 2016-08-04 09:58:36 -07:00
Kevin Sawicki
48cc13d009 Add BrowserWindow.getClientBounds API 2016-08-04 09:58:35 -07:00
Cheng Zhao
0c1d91a895 display.h needs to be used together with screen.h 2016-07-22 23:37:20 +09:00
Cheng Zhao
cf6f4708bc Fix building on Windows 2016-07-21 11:20:43 -06:00
Cheng Zhao
6850500a65 Fix building on Linux 2016-07-21 07:09:01 -06:00
Cheng Zhao
b57665330c Merge branch 'master' into chrome52 2016-07-21 05:34:36 -06:00
Cheng Zhao
a1a870fe43 Auto-hide menubar when in fullscreen 2016-07-11 13:10:19 +09:00
Cheng Zhao
e8e2763131 win: Add toolbar type for BrowserWindow 2016-07-11 12:46:50 +09:00
Cheng Zhao
f77b9db069 Fix unmaximize() not working 2016-07-09 23:16:57 +09:00
Cheng Zhao
5979c1464f Remember bounds instead of size 2016-07-09 23:10:36 +09:00
Cheng Zhao
c4de246bfb Correctly handle unmaximize 2016-07-09 23:04:42 +09:00
Cheng Zhao
baff744601 Use setBounds to implement maximize for window without thickFrame 2016-07-09 22:49:55 +09:00
Cheng Zhao
2ece9e2885 Add thickFrame option 2016-07-09 21:49:15 +09:00
Kevin Sawicki
2faf00dc19 Only use default accelerator in Windows/Linux app menu 2016-07-07 11:50:19 -07:00
Cheng Zhao
41b8dda071 For hidden window focus() should do nothing 2016-07-05 10:34:52 +09:00
Cheng Zhao
381689d3ed Fix building on Windows 2016-07-05 09:31:29 +09:00
Milan Burda
c243cf0c0f Add BrowserWindow.prototype.setContentProtection(enable) 2016-06-22 10:40:33 +02:00
Cheng Zhao
5674e8d114 Only define enable/disable API for views 2016-06-20 15:44:50 +09:00
Cheng Zhao
e33e4be257 macOS: Use sheet window as modal window 2016-06-20 14:49:24 +09:00
Cheng Zhao
1866dbe608 Move disable counter to NativeWindow from api::Window 2016-06-20 11:48:46 +09:00
Cheng Zhao
02acce8991 linux: Make modal dialog show more smoothly 2016-06-20 11:16:41 +09:00
Cheng Zhao
9aa7291627 linux: Implement win.disable/enable/isEnabled() API 2016-06-20 11:16:41 +09:00
Cheng Zhao
f4bec78ccb linux: Implement win.setParentWindow(parent) 2016-06-20 11:16:41 +09:00