Commit graph

397 commits

Author SHA1 Message Date
Samuel Attard
d7f07e8a80 refactor: rename the atom directory to shell 2019-06-19 17:33:28 -07:00
Jeremy Apthorp
0b25176893
refactor: mojofy draggable regions (#18536) 2019-06-03 10:43:04 -07:00
Electron Bot
96b32a814c chore: bump chromium to 964c4bca8de5c320534d95606c861 (master) (#18440)
* chore: bump chromium in DEPS to 2930eb12d56988c2c80bad2797ab036fe493d4e1

* chore: update patches

* Revert "disable robotjs-based tests"

This reverts commit e56adafc1f.

* Revert "skip dbus tests (#18409)"

This reverts commit aea042cc83.

* Revert "skip more dbus tests"

This reverts commit 68dbef48da.

* chore: bump chromium in DEPS to fd62da5601399b92effaa32a943fcd96143c8605

* chore: bump chromium in DEPS to 99f87ca22ee6e7ec953defe694771cb68f47a596

* chore: bump chromium in DEPS to d88778435b4cd9a510a63385b6d4ba24674b9774

* chore: update patches

* chore: update ssl_security_state_tab_helper.patch

* Remove content_packaged_services

https://chromium-review.googlesource.com/c/chromium/src/+/1604203

* chore: fix false positive lint error

* views: wireup widget name to crash data

https://chromium-review.googlesource.com/c/chromium/src/+/1626640

* chore: bump chromium in DEPS to ab588d36191964c4bca8de5c320534d95606c861

* roll patches
2019-05-28 13:18:10 -07:00
Cheng Zhao
340014a9d3 fix: leave space for autohide taskbar for frameless maximized window (#18321) 2019-05-20 19:50:03 -05:00
Shelley Vohr
00358545a9
fix: explicitly focus window on win.show() (#18046) 2019-04-30 16:43:45 -07:00
Shelley Vohr
4e57a732a8
feat: allow windows to be excluded from the windows menu (#17404)
* feat: allow windows to be excluded from the windows menu

* excludedfromWindowsMenu => excludedFromShownWindowsMenu

* implement no-op for win & linux
2019-03-27 08:10:23 -04:00
Julien Isorce
27bd47a333 feat: implement BrowserWindow.moveTop on X11 (#16629)
It was implemented on Mac and Win but not on X11.
Tested on Ubuntu 16.04 and 18.04.

Also added a unit test in spec/api-browser-window-spec.js.
This test BrowserWindow.moveTop verifies that calling moveTop
on a window does not give the focus to this window.

notes: BrowserWindow.moveTop is now available on Linux/x11

https://github.com/electron/electron/issues/12516
2019-02-07 12:48:19 -08:00
Heilig Benedek
cbb5164cc8 fix: improve the way frameless windows are handled on Windows (#16596)
* fix: improve the way frameless windows are handled on Windows

* tidy up code

* fix: return nullAcceleratedWidget instead of nullptr

* fix: format, use reinterpret cast
2019-01-31 11:19:47 +09:00
Vladimir
49ec7e1582 feat: flexible autoresize for BrowserViews (#16184)
* feat: flexible autoresize for BrowserViews

* fix: change to static_cast

* Slight format code
2019-01-31 11:07:19 +09:00
Jeremy Apthorp
f115376595 fix: remove pretarget handler before window destruction 2019-01-22 10:32:06 -08:00
Vladimir
5ae3d1a1b2 feat: add multi BrowserView support to BrowserWindow (#16148)
* feat: add multi BrowserView support to BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

* fix: for lint and osx compile errors

* fix: lint error in test code

* feat: add multi BrowserView support to BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

* fix: for lint and osx compile errors

* fix: lint error in test code

* fix: method to be accessible on mac api impl

* fix: missed function declarations for mac impl

* fix: use base class reset function
2018-12-22 10:49:26 +09:00
Simone Cattaneo
649633bbb7 fix: make 'setParentWindow' compatible under Windows (#15775) 2018-12-12 16:05:16 -08:00
Cheng Zhao
624ade2c25 fix: return pointer instead of pointer's content (#16014) 2018-12-11 12:45:55 -05:00
Saswat Bhattacharya
d243a45173 feat: implement 'app-command' events for browser history navigation keys on Linux (#15441)
* Added mouse forward/back button support on Linux

* Added browser history navigation action bindings for Windows, Mac, and Linux keyboard

* Removed new `history-action` event and modified `app-command` to execute on such events

* Removed attempt at macOS support and added constants

* Clarified app-command documentation

* Reverted 'app-command' description change

* Format code
2018-12-05 09:35:59 -08:00
Samuel Attard
85fdacbc49 chore: replace ShowWithWindowState with Show inside native_window_views
The functionality was merged in as a parameter to the core Show method, default
for restore_bounds is an empty gfx::Rect()

refs: https://chromium-review.googlesource.com/c/chromium/src/+/1174910
2018-12-03 20:07:42 +05:30
Nitish Sakhawalkar
5994bf6745
fix: Menu accelerators not working (#15094)
This change fixes the regression in the menu accelerators working in linux, on some environments.
2018-11-09 13:54:16 -08:00
Samuel Attard
9aed2a465f fix: send NSView* as the response to getNativeWindowHandle() instead of a null handle (#15521) 2018-11-08 09:03:19 -08:00
Milan Burda
6f3c46cc7e refactor: move devtools from brightray to atom (#15234) 2018-10-19 15:50:30 +02:00
Michelle Tilley
51f3fb9bde
fix: correctly enable and disable windows on Windows and Linux (#15184) 2018-10-18 14:23:40 -07:00
Shelley Vohr
27bbf6a3c6 feat: add evt listeners for SetAlwaysOnTop (#14951)
* feat: add evt listeners for SetAlwaysOnTop

* only emit one event on AlwaysOnTop change

* docs: add new alwaysontop event

* dont emit if theres no change

* address feedback from review
2018-10-04 13:02:16 -05:00
Troy
560b1c17af fix: setMaximizable to be true if window is resizable & maximizable (#14648)
* setMaximizable to be true if window is resizable & maximizable

* Fix linting

* Add regressive test to verify maxmizable state

* Leaves maximizable state of window alone if setResizable is called

* Fix exclusive test

* Fix crashing text

* SetMaximizable unconditionally

* Remember former maximizable state

* Fix accidental mac variable deletion

* Logic modification

* Lint

* Remove unneeded test

* Remove unneeded variable since only Windows is effect
2018-09-26 11:41:40 +10:00
Charles Kerr
d663b4eaee
fix: fix gn cpplint warnings (#14583)
* chore: fix cpplint 'include_what_you_use' warnings

Typically by including <memory>, <utility> etc.

* chore: fix 'static/global string constant' warning

Use C style strings instead of std::string.

Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

/home/charles/electron/electron-gn/src/electron/script/cpplint.js

* refactor: remove global string variables.

Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.

The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

* fix: initializer error introduced in last commit

* fix: remove WIP file that was included by accident

* fix: include order

* fix: include order

* fix: include order

* fix: include order, again
2018-09-12 19:25:56 -05:00
Nitish Sakhawalkar
e90c281ef3 fix: Windows Background color issue (#14561)
Call InvalidateRect for windows after setting the bg color
2018-09-12 13:41:47 -07:00
Nitish Sakhawalkar
a2ab0d8ebe fix: notify focus change right away rather not on next tick (#14453)
* fix: Notify focus change right away, not on next tick

* fix: emit the JS blur/focus events on next tick to avoid race condition

* address feedback from review

* fix: bind deferred Emit() calls to a WeakPtr

This is so that the deferred Emit() calls will be canceled
if the TopLevelWindow is destroyed.

* chore: remove wip/test code cruft

* fix: make linter happy

* Enable disabled tests

* refactor: cleaner impl of EmitEventSoon()

* Revert "Merge branch 'fix-win-focus' of github.com:electron/electron into fix-win-focus"

This reverts commit 90576806eb271d059f0a215c67e9b4b04f7396a4, reversing
changes made to 9c13e47779a3af78fe0970c1f3d6cd040a5354e6.

* Restore 704722c1, which was removed in error.

We apologise again for the fault in the subtitles. Those responsible for sacking the people who have just been sacked have been sacked.
2018-09-07 13:21:58 -05:00
Paulius
b89848d683 feat: allow window above full screen windows on mac (#14122)
* allow window above full screen windows on mac

* add visibility change params to higher level files

* adress feedback, fix bool issue, remove compilation hooks

* adjust readme

* switch to options object

* single argument for native window views
2018-08-31 15:06:02 -07:00
Emmanuel Kimmerlin
5f6706ac33 feat: BrowserWindow.getNormalBounds() (#13290)
* First commit

* Add Mac support (1st attempt)

* Add Mac support (2nd attempt)

* Simplify tests

* Restore window state !

* Looking at other tests, seems minimize, maximize, fullscreen are skipped when in CI

* Fix Mac tests

* Restore tests in CI

* Fix typo

* widget getRestoredBounds not working on Mac !!

* widget getRestoredBounds not working on Mac !!

* Add IsNormal function

* Add IsNormal

* IsNormal => isNormal

* Deactivate fullscreen on Mac. Do not receive leave-fullscreen event

* Set default original_frame_

* Set default original_frame_

* Fix Mac
2018-08-24 14:33:27 -07:00
Aleksei Kuzmin
d6ffbc0148 Use an int for wm::ShadowElevation. Pick semantic constants.
https://chromium-review.googlesource.com/899886
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
f6648a0d4d Remove ScopedComPtr and scoped_comptr.h
https://chromium-review.googlesource.com/726461
2018-06-19 11:49:43 +10:00
Aleksei Kuzmin
82d204e932 Wrap X11 headers in ui/gfx/x/x11.h
https://chromium-review.googlesource.com/756711
2018-06-19 11:49:43 +10:00
deepak1556
5df0362361 Remove obsolete ShouldHandleSystemCommands function.
https://chromium-review.googlesource.com/c/chromium/src/+/924315
2018-06-19 11:49:42 +10:00
Milan Burda
2337237d58 Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
Jeremy Apthorp
da0fd10423 refactor: chromium-style warnings in linux code (#12949) 2018-05-16 14:12:45 -05:00
Cheng Zhao
2f3fcb9dbe give window a default content view
Certain APIs are expecting the window to have a content view, having a
default one simplifies our design.
2018-05-15 14:12:47 +09:00
Cheng Zhao
2b24b26e59 refactor: do not pass WebContents to NativeWindow 2018-05-15 14:03:21 +09:00
Cheng Zhao
c67d1b62e3
refactor: NativeWindowViews should not be a View (#12750) 2018-05-01 13:28:22 +09:00
Cheng Zhao
089428857c remove unnecessary defines 2018-04-30 10:56:54 +09:00
Cheng Zhao
e07ea24610 remove unnecessary static_cast 2018-04-30 10:56:54 +09:00
Cheng Zhao
2225cc9608 refactor: manage widget_ in NativeWindow 2018-04-30 10:56:54 +09:00
Cheng Zhao
727cd68cee refactor: Use widget() instead of window_ 2018-04-30 10:56:54 +09:00
Cheng Zhao
6d18bd0633 refactor: Make NativeWindow inherit WidgetDelegate 2018-04-30 10:56:54 +09:00
Shelley Vohr
c6f4bbd143
also format missing .cc files 2018-04-18 20:48:45 -04:00
Cheng Zhao
56735d4ff5 Add NativeWindow::SetContentView 2018-04-11 15:12:53 +09:00
Cheng Zhao
13473ee138 web_view_ => content_view_ 2018-04-11 15:12:53 +09:00
Cheng Zhao
97e8800677 Remove web_contents from NativeWindow's constructor 2018-04-11 15:12:53 +09:00
Charles Kerr
cad8eed6e4 Use ui:view's Activate() on Linux (#12539)
In NativeWindowViews, we started rolling our own _NET_ACTIVE_WINDOW
event in June 2016 to raise windows because Chromium's implementation
wasn't working as expected. (See commit 32b692b6)

I'm not seeing this behavior in our current version of libcc,
so I wonder if this workaround is still needed?
2018-04-05 22:39:53 -04:00
Cheng Zhao
c75dd93b92
Move AutofillPopup from NativeWindow to WebContents (#12514) 2018-04-05 09:53:51 +09:00
MadfishDT
200388ff96 add moveTop API to move window z-oder to top for win32, mac (#12485)
* add moveTop API to move window z-oder to top for win32, mac

* BrowserWindow::MoveTop SetMethod bug fix
2018-04-03 08:04:32 -05:00
Cheng Zhao
3d47a8a2fd Remove the static getter methods from WebContentsPreferences 2018-03-22 15:20:03 +09:00
Cheng Zhao
887bc12350 Add WebContentsPreferences::From that checks parameter 2018-03-22 15:16:26 +09:00
Cheng Zhao
9772777919 web_prefrences() => dict()
Having property name being the same with class name is making code
harder to understand, and dict is much shorter.
2018-03-22 15:15:30 +09:00