summaryrefslogtreecommitdiffstats
path: root/src/cmd/devdraw/cocoa-screen.m
Commit message (Collapse)AuthorAgeFilesLines
* devdraw: use consistent mac-* prefix on macOS filesRuss Cox2020-01-131-1249/+0
| | | | We were using osx- and cocoa- but it's not even OS X anymore.
* devdraw: can use libthread directly now on macOSRuss Cox2020-01-131-8/+11
|
* devdraw: simplify mac file namesRuss Cox2020-01-131-0/+1246
| | | | | | Now that we only have Metal, we can drop the -metal. Also now that Carbon is gone we can drop the macargv.c, and then the -objc from object file names.
* devdraw: drop pre-metal macOS supportRuss Cox2020-01-131-1674/+0
| | | | | | | We didn't start using Metal until macOS 10.14, but it was available on 10.13, which is currently the oldest Apple-supported version of macOS. Simplify by deleting the old code.
* devdraw: avoid deadlock on pre-Mojave macOSRuss Cox2019-04-051-0/+6
|
* devdraw: add Cursor2 support on macOS 10.14 MojaveRuss Cox2018-11-151-1/+9
| | | | | This replaces the pixel-art scaling algorithm used for upscaling before. The results were not crisp enough to serve as everyday cursors.
* devdraw: make ctrl generate 1-click while mouse down (#119)Xiao-Yong2018-11-131-0/+2
| | | This makes 2-1 chords possible with touchpad on a mac laptop.
* devdraw: fix build on macOS < 10.12Rudá Moura2017-10-091-0/+2
| | | | | | | | | | After making the build on macOS silent on commit 310ae03, the build was broken on macOS lesser than 10.12 (Sierra). This commit conditionally checks the version the of the SDK before using the defined values for silent build. Fixes #66.
* devdraw: fix Mac Kcmd+ShiftRuss Cox2017-07-161-0/+3
| | | | | | Change-Id: Ide32a9397701085b17fbd42f0866eb3de11e4190 Reviewed-on: https://plan9port-review.googlesource.com/2940 Reviewed-by: Russ Cox <rsc@swtch.com>
* all: fix or silence all INSTALL warnings on macOSRuss Cox2017-01-061-59/+81
| | | | | | | | Should be a clean build now. Change-Id: Id3460371cb5e8d4071f8faa9c2aec870d213a067 Reviewed-on: https://plan9port-review.googlesource.com/2781 Reviewed-by: Russ Cox <rsc@swtch.com>
* devdraw: cocoa: set window title on main threadsqweek2015-11-111-2/+12
| | | | | | Change-Id: Ie818f9246f749a9d3293019a1e01be4ce7e368b9 Reviewed-on: https://plan9port-review.googlesource.com/1400 Reviewed-by: Russ Cox <rsc@swtch.com>
* devdraw: plumb drag-n-dropped filesmarius a. eriksen2015-06-031-0/+39
| | | | | | Change-Id: I7585870aee57c7482ebdd19c117be7982123ce79 Reviewed-on: https://plan9port-review.googlesource.com/1130 Reviewed-by: Russ Cox <rsc@google.com>
* devdraw: enable retina behavior by default on OS XRuss Cox2015-02-171-3/+3
| | | | | | Change-Id: I243a1fe3f9ec0841570c4cd69c02be9cfd9ade50 Reviewed-on: https://plan9port-review.googlesource.com/1172 Reviewed-by: Russ Cox <rsc@swtch.com>
* devdraw: fix title and "open in top" on OS XRoi Martin2014-12-021-1/+4
| | | | | | | | | | | | | | | | On OSX 10.10, when you open an application that depends on devdraw, the title bar only shows the first letter of the application's name. The patch sets a default title as soon as the window is created, which fixes this issue. On OSX 10.10, when you open an application that depends on devdraw, this application is opened in top of other windows, however the menu bar is not updated. The patch calls topwin() at the end of makewin() in src/cmd/devdraw/cocoa-screen.m . Change-Id: Ie036928b5574c8df20ad8b2b54047e2f7a22bb41 Reviewed-on: https://plan9port-review.googlesource.com/1091 Reviewed-by: Russ Cox <rsc@swtch.com>
* devdraw: set window name to argv[0]Russ Cox2013-08-061-0/+120
| | | | | | R=rsc CC=r https://codereview.appspot.com/12577043
* devdraw: fake dpi calculation on MacRuss Cox2012-11-251-0/+8
| | | | | R=rsc http://codereview.appspot.com/6782115
* devdraw: add forcedpi toggled by Fn+F3 on MacRuss Cox2012-11-251-2/+2
| | | | | R=rsc http://codereview.appspot.com/6846104
* devdraw: fix retina modeRuss Cox2012-11-251-1/+1
| | | | | R=rsc http://codereview.appspot.com/6847104
* devdraw: restore compilation on OS X 10.6Shenghou Ma2012-11-251-0/+2
| | | | | | | Also add some ignored files to .hgignore R=rsc http://codereview.appspot.com/6842089
* devdraw: MacBook retina supportRob Kroeger2012-10-161-8/+121
| | | | | | | | Enable with export devdrawretina=1 (everything will be smaller). R=rsc CC=plan9port.codebot http://codereview.appspot.com/6592072
* devdraw: make it 3 times faster on OS XDavid Jeannot2012-08-031-42/+49
| | | | | | | | This patch reverts the recent patch named "devdraw: fix for OS X 10.8", and fixes redrawing on OSX 10.8 differently, making scrolling under Acme 3 times faster. R=rsc, mirtchovski CC=plan9port.codebot http://codereview.appspot.com/6452087
* devdraw: fix for OS X 10.8 (Mountain Lion)Rob Kroeger2012-07-311-31/+40
| | | | | | | | | | | | | In MacOS 10.8, the NSBitmapImageRep class appears to cache the specified image data at the time of construction. As a result updates to the backing memimage object do not get pushed to the screen in flushimg. This patch creates the NSBitmapImageRep object over again for each flushimg which would appear to fix the problem. R=rsc CC=plan9port.codebot http://codereview.appspot.com/6443063
* devdraw: fix mouse warping with multi-monitor on OS XDavid Jeannot2012-03-051-3/+3
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5748043
* Devdraw now waits for the image: this means thatDavid Jeannot2012-03-051-74/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is no more blank image when toggling fullscreen, when unminimizing, or at startup; this also means that we can live resize, but we only enable live resizing with Page, because it seems useless for other apps, and Acme and Sam bug with it. The tradeoff is that bottom corners are sometimes automatically rounded. There is a way to prevent the rounding here: http://parmanoir.com/Custom_NSThemeFrame but this would obfuscate the code. Instead, we make sure that the corners are always rounded. Closing the window while its content is updated causes an exception, without this patch. This seems to happen regularly with stats(1). This patch avoids a possible deadlock at startup, which I never experienced. If I recollect right, there is little chance that this happens on a multi-core CPU. Minimizing now activates next app in line, and Devdraw now stops drawing while minimized. R=rsc CC=plan9port.codebot http://codereview.appspot.com/5499043
* devdraw: fix winsize (-W) on OS XDavid Jeannot2012-03-051-5/+11
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5749043
* devdraw: fix fullscreen on LionRuss Cox2012-02-281-1/+6
| | | | | | | | | | | Now, if you full-screen an app running on a secondary screen, it only takes over that monitor. It does not cause the primary screen to disappear. Code by David Jeannot. R=djeannot24 http://codereview.appspot.com/5708046
* devdraw: enable gestures on OS XDavid Jeannot2012-01-201-183/+8
| | | | | | | | | Remove swipe gestures. Keep only 2-finger pinching and 3-finger tapping. R=rsc CC=plan9port.codebot http://codereview.appspot.com/5498094
* devdraw: make OS X resizer unobtrusiveDavid Jeannot2012-01-191-4/+31
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5558051
* devdraw: on OS X, add menu items "hide" and "plumb devdraw(1)"David Jeannot2012-01-161-14/+22
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5505092
* devdraw: OS X: neutralize menu and Dock bugs in fullscreen modeDavid Jeannot2012-01-161-3/+9
| | | | | | | | | | | | | | | | | | | Previously, the menu bar has been set to hidden instead of autohidden in fullscreen mode, because it appeared too easily. Occasionally however, it still appears. This patch makes sure it won't. With OS X Lion's fullscreen, the Dock is autohidden, but sometimes remains hidden. This bug comes with visual menu bar bugs during space transition and when exiting fullscreen. Those bugs happen after each Devdraw's activation, for example. This patch neutralizes them. R=rsc CC=plan9port.codebot http://codereview.appspot.com/5502091
* devdraw: fix handling of compose key on OS XDavid Jeannot2012-01-161-11/+4
| | | | | | | | | | | This implementation is simpler to understand. It removes conflicts with other modifiers and with the virtual buttons. Pressing alt during a sequence now cancels it correctly. R=rsc CC=plan9port.codebot http://codereview.appspot.com/5507049
* cocoa devdraw: activation on receiving Ttop messagesDavid Jeannot2012-01-161-1/+15
| | | | | | | | | | | | (The new variable "willactivate" is in the input structure "in", which is illogical. But this structure will soon be renamed "app". I postpone the renaming to avoid conflicts with simultaneous Codereview issues.) R=rsc CC=plan9port.codebot http://codereview.appspot.com/5504102
* devdraw: OS X dead key supportDavid Jeannot2012-01-161-0/+19
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5503086
* Cocoa Devdraw: cursor fixDavid Jeannot2011-12-091-111/+138
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5356050
* Cocoa Devdraw: cursor, menu bar, old fs, activationDavid Jeannot2011-11-081-20/+52
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5318054
* devdraw: cocoa fixes, bigarrow support (thanks Marius Eriksen)Russ Cox2011-10-231-2/+33
|
* devdraw: more fixes (thanks David Jeannot)Russ Cox2011-10-121-306/+345
|
* devdraw: fix screen grabber, allocation warningDavid Jeannot2011-10-031-62/+113
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5170041
* devdraw: cocoa updatesDavid Jeannot2011-09-261-43/+55
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5131041
* devdraw: update Lion cocoaDavid Jeannot2011-09-191-361/+599
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/5015042
* devdraw: draft cocoa supportDavid Jeannot2011-09-061-0/+835
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4974060