Commit graph

164 commits

Author SHA1 Message Date
James Wheare
8482109dea Switch to a single OS X swipe event with a direction argument 2016-03-23 15:20:11 +00:00
James Wheare
03319a5426 OSX: Capture 3-finger swipe events in NativeWindow 2016-03-18 15:21:19 +00:00
Arek Sredzki
fcc1f4d7ed Finalized browser-window show & hide events, added tests & fixed os x implementation 2016-03-10 13:51:31 -08:00
Cheng Zhao
2a0be28111 Merge pull request #4682 from phamdaniel/ismaximized
Fix `isMaximized()` in window for when resizable is set to false on OSX
2016-03-06 19:23:46 +09:00
Cheng Zhao
d93ccd47a8 Merge pull request #4670 from atom/cmd-backtick-order
Use sendAction for cycling windows
2016-03-06 16:17:38 +09:00
Cheng Zhao
114801d412 Remove the duplicate logic on OS X 2016-03-05 21:54:41 +09:00
Daniel Pham
d5f5cdb45a 🍎Fix 'isMaximized()' for non resizable windows 2016-03-05 01:39:48 -05:00
Kevin Sawicki
be67dca686 Use _cycleWindows selector to implement cmd-` 2016-03-03 20:53:58 -08:00
Cheng Zhao
12569f2c9d mac: Simulate the behavior of cmd+~ when OS X didn't handle it 2016-02-18 18:32:13 +08:00
Cheng Zhao
a83aee90e5 No need to use scoped_nsobject for id 2016-01-25 15:15:58 +08:00
Cheng Zhao
059d97e1aa Merge pull request #4181 from bengotow/scroll-touch-events
Extend NativeWindow to track touch-based scroll events on OS X
2016-01-25 14:47:54 +08:00
Cheng Zhao
7761815339 Merge branch 'bg-color-pr' of https://github.com/evgenyzinoviev/electron 2016-01-24 21:33:53 +08:00
Cheng Zhao
c41de501cb spec: Test the -able methods 2016-01-24 14:31:37 +08:00
Cheng Zhao
010cc3276a Simplify the setStyleMask calls 2016-01-24 14:31:37 +08:00
Cheng Zhao
239bfe970c Make hasShadow work on Windows/Linux 2016-01-24 14:31:37 +08:00
Cheng Zhao
d704b3f7ba Reorgnize how attributes work 2016-01-24 14:31:37 +08:00
Cheng Zhao
ae7e96f181 Fix fullscreenable on EL Capitan 2016-01-24 14:31:36 +08:00
Cheng Zhao
5372b6cd91 Fullscreenable => FullScreenable 2016-01-24 14:31:36 +08:00
Cheng Zhao
31624995bc Merge pull request #4202 from evgenyzinoviev/shadow-pr
Added hasShadow option to BrowserWindow on OS X
2016-01-22 23:56:38 -08:00
Cheng Zhao
8cabe0f008 Merge pull request #4156 from evgenyzinoviev/windows-pr
Improvements in BrowserWindow
2016-01-22 23:42:41 -08:00
evgenyzinoviev
ff41b4a267 added hasShadow option to BrowserWindow (osx) 2016-01-23 01:16:08 +01:00
evgenyzinoviev
2fcd3ce7cd Support alpha in backgroundColor 2016-01-23 00:55:08 +01:00
evgenyzinoviev
85991d312a mac: SetResizable fix 2016-01-22 23:44:17 +01:00
evgenyzinoviev
ef51e4e108 maximizable and fullscreenable 2016-01-22 23:21:46 +01:00
Ben Gotow
d186dceb4b Add correct window check for wheel events. See description
Tested that with two windows, events are fired on the correct BrowserWindow instance and not both, and that scrolling a window which is in the background works properly.
2016-01-21 16:36:48 -08:00
Ben Gotow
e96e674201 Properly clean up NSEvent monitor 2016-01-21 16:31:31 -08:00
Cheng Zhao
21f5e27a5e Merge pull request #4161 from gabriel/master
Support backgroundColor for window on mac
2016-01-21 15:42:21 -07:00
Gabriel Handford
239baa3e9a Support backgroundColor for window on mac 2016-01-21 11:07:33 -08:00
Ben Gotow
bd2252ea55 Extend NativeWindow to track touch-based scroll events on OS X
In N1, we want to implement the famous "swipe to archive" action on threads in the user's inbox. Chrome exposes `scroll` and `wheel` events, but these aren't sufficient to implement the interaction because the element needs to "snap" when the user lifts their fingers from the trackpad, not when they / we stop receiving `wheel` / `scroll` events. These events may stop before the user lifts their fingers, or continue after the user has lifted their fingers if they had enough momentum for the gesture to continue.

This exposes BrowserWindow `scroll-touch-down` and `scroll-touch-up`, which fire immeditaely when the user touches two fingers to the trackpad, and again when the user lifts their fingers. Combined with the existing wheel event should allow for "swipe-to-archive" and other similar interactions.

Note: This is only implemented on Mac OS X and the events don't fire unless you're using a trackpad!

Related: #1486, #2683, https://github.com/nylas/N1/issues/541
2016-01-21 09:40:21 -08:00
evgenyzinoviev
2a554cb138 added or/and improved closable, minimizable, movable, resizable features for windows on os x and windows 2016-01-19 16:14:57 +01:00
Cheng Zhao
712f11a9a3 Merge pull request #4112 from evgenyzinoviev/resize-animate-pr
Animate window resizing on OS X
2016-01-16 12:12:00 +08:00
evgenyzinoviev
b75dccb0be arguments handing rewritten, doc updated 2016-01-15 17:31:31 +01:00
evgenyzinoviev
2598b00b41 Animate window resizing on OS X 2016-01-15 05:59:58 +01:00
evgenyzinoviev
cda88db77c Added option to prevent a window from being moved on OS X 2016-01-15 03:58:57 +01:00
Omri Litov
943e46f3bd Fix linux and mac build errors 2016-01-08 00:27:53 +02:00
Omri Litov
3f0c007578 Added getNativeWindowHandle 2016-01-07 22:38:35 +02:00
Cheng Zhao
10f663d017 Fix hiding fullscreen button on EL Capitan 2016-01-07 15:46:40 +08:00
Cheng Zhao
e90435e236 Remove visual artifacts of hidden-inset window 2015-12-23 12:38:11 +08:00
jaanus
aa2f7aaf3a Fixes #2810: correct look of hidden-inset windows in full screen.
`hidden` and `hidden-inset` windows differ only by the hidden-inset window having a toolbar. Yet, the toolbar yields an incorrect look in fullscreen mode. So, we hide and recreate the toolbar for such windows when going to/from fullscreen.

There are some visible artifacts during the fullscreen animations, as the toolbar gets created and destroyed. When entering fullscreen, you see a toolbar that then disappears. When going back to normal window, you see the traffic light buttons jump around a little bit. Yet, this is definitely better than the current broken fullscreen look.
2015-12-22 20:31:55 +02:00
Cheng Zhao
774ba2a235 Merge pull request #3706 from billyct/master
support an api with SetIgnoreMouseEvents for osx
2015-12-09 12:00:16 +08:00
Cheng Zhao
0f2f9b5543 No need to use CommandDispatcher 2015-12-08 11:20:07 +08:00
Cheng Zhao
73e7773d84 Update to API changes of Chrome 47 2015-12-07 19:56:23 +08:00
billyct
5f092a6c65 support an api with SetIgnoreMouseEvents, and worked fine with osx 2015-12-06 10:14:54 +08:00
Cheng Zhao
6c1878d15b mac: Clears the delegate when window is going to be closed
Since EL Capitan it is possible that the methods of delegate would get
called after the window has been closed.

Refs atom/atom#9584.
2015-11-26 13:56:56 +08:00
Cheng Zhao
8e2faba8f7 Small style fix 2015-11-20 13:06:42 +08:00
Ben Gotow
d427ae1030 Support the "desktop" window type on Mac OS X
Adds the desktop window type referenced in https://github.com/atom/electron/issues/2899 for compatiblity with the linux version. Note that on Mac OS X, the desktop window cannot receive input events (seems to be a limitation of being behind the desktop).

In this diff I also removed the `standardWindow` option from the docs, in favor of an additional `textured` value for window `type` on Mac OS X. The old `standardWindow` option continues to work, but seemed more confusing. If this seems like a bad idea, I can revert that change.
2015-11-19 00:39:45 -08:00
Cheng Zhao
860c46b3c1 Separate options from switches
On Windows the case sensitivity of command line switches are ignored, so
--nodeIntegraion will become --nodeintegration.

We should separate options from switches so we use "nodeIntegraion" in
options, while passing "--node-integration" in command line.
2015-11-13 14:05:49 +08:00
Cheng Zhao
e36d455d51 Add setBackgroundColor method 2015-10-23 11:35:33 +08:00
Cheng Zhao
d092c6acc9 osx: Implement draggable region with mouseDownCanMoveWindow
Previously we implemented draggable region by tracking mouse position,
it is buggy and causing some problems. But it is interesting that until
this didn't cause troubles until recently.
2015-10-21 08:54:46 +08:00
Cheng Zhao
898db4d6bd osx: Set resizable flag when creating window
Setting resizable for frameless window before it is shown will change
its size.
2015-10-06 15:23:23 +08:00