summaryrefslogtreecommitdiff
path: root/gdk/quartz
Commit message (Collapse)AuthorAgeFilesLines
* quartz: Don't use the instancetype keywordMatthias Clasen2015-10-251-1/+1
| | | | | | | | | gdkcursor-quartz.c uses the instancetype keyword, which doesn't seem to be supported in the version of Objective C that Snow Leopard uses. Replacing that keyword with the thing it represents makes it build. Patch by Ryan Hendrickson, http://bugzilla.gnome.org/show_bug.cgi?id=756770
* Bug 736125 - The default gtk accelerator mod mask does not include all ↵John Ralls2015-08-251-0/+5
| | | | default backend modifiers
* quartz: Implement CSD drag resize for all edges/cornersChristoph Reiter2015-08-083-33/+67
| | | | | | | Manual resizing for CSD windows only worked with the bottom right corner. This extends it to work for all corners and edges. https://bugzilla.gnome.org/show_bug.cgi?id=753329
* quartz: disable system shadows if a GdkWindow shadow is set.Christoph Reiter2015-07-272-2/+20
| | | | | | | | The shadow will be drawn in the wrong place in those cases so all we can do is disable it. This fixes double shadows drawn around menus, popups and tooltips. https://bugzilla.gnome.org/show_bug.cgi?id=734984
* quartz: Fix buildingPatrick Griffis2015-07-271-3/+3
| | | | Broken by 6d04183c5d6 and 6ac07a2e85ea
* quartz: Check if a drag ends inside a known windowMatthias Clasen2015-07-261-0/+28
| | | | | | | | If a drag ends inside a known window, set the dest_window field in the drag context. This information is needed to implemented notebook tab dragging. https://bugzilla.gnome.org/show_bug.cgi?id=752638
* quartz: remove maximized state when the window position/size is changedChristoph Reiter2015-07-232-0/+30
| | | | | | So a window can be maximized/zoomed again after being moved away from its maximized position. This makes the zoom button on non-CSD windows work as before.
* quartz: implement maximized/unmaximizedChristoph Reiter2015-07-233-16/+49
| | | | | | | | | | | | Instead of using the default zoom behaviour use the internal maximized state for selecting our own zoom target. This makes zooming work for CSD windows where for some reason the given default zoom target is the current window frame itself resulting in a shadowless window of the same size. While this makes the zoom button behave a bit different as expected it makes things more consistent with other platforms and fixes CSD zooming.
* quartz: make moving CSD windows right up to the screen's menu bar work.Christoph Reiter2015-07-231-0/+16
| | | | | The default implementation prevents the window + shadow to move above the menu bar. Change it so only the window is considered.
* gdkwindow-quartz: partial aspect ratio supportTom Schoonjans2015-07-071-1/+11
| | | | | | | | Support was added for GDK_HINT_ASPECT in gdk_quartz_window_set_geometry_hints though with one restriction: min_aspect and max_aspect have to be equal, which I believe corresponds to the most common usage. A warning will be printed if this condition is not met but min_aspect will be used anyway.
* Implemented most of the GDK named cursors on Mac OS X.Pietro Gagliardi2015-05-161-39/+118
| | | | | | | | Only "wait" and "all-scroll" are not implemented properly. OS X does not seem to have a proper interface to either cursor. Approximations are used instead; see the code. See bug 749178.
* quartz: Support css cursor namesMatthias Clasen2015-05-111-2/+46
| | | | | | | | We want these to work across platforms, so do a best-effort approximation. We could do much better here by copying what webkit does. https://bugzilla.gnome.org/show_bug.cgi?id=749178
* quartz: Non-implementation of GdkGLContextPhilip Chimento2015-05-094-0/+84
| | | | | | | This makes sure the Quartz backend returns an error when asked to create a GL context, rather than crashing because of a NULL vfunc. https://bugzilla.gnome.org/show_bug.cgi?id=740199
* gdkkeys: Add support to _get_scroll_lock_state()Fabiano Fidêncio2015-04-271-0/+8
| | | | | | | GdkKeymap already has support for _get_num_lock_state() and _get_caps_lock_state(). Adding _get_scroll_lock_state() would be good for completness and some backends (Windows?) could take advantage of this.
* gdk/quartz: Fix mixup in attributes usage creating window implementationThibault Saunier2015-02-221-3/+4
| | | | | | | | | | First, attributes can be NULL (which is always the case when calling gdk_window_ensure_native) so do not unconditionally dereference it. Then the window_type should be taken directly from the GdkWindow as in other backends (such as the X11 one for example). https://bugzilla.gnome.org/show_bug.cgi?id=744942
* quartz: NSWindow NULL check in get_scale_factorPhilip Chimento2014-12-241-1/+1
| | | | | | | | | | | Sending backingScaleFactor to a NULL NSWindow will silently give the value 0 for the scale factor, causing insidious divide-by-zero bugs down the line. This checks if the NSWindow is NULL first, as seems to happen throughout the rest of the file. Note that I don't have a hi-DPI OS X machine to test this on, though. https://bugzilla.gnome.org/show_bug.cgi?id=738338
* gdkwindow: Don't pass the region to the impl when beginning a paintJasper St. Pierre2014-11-221-3/+2
| | | | | | It's unused. At the same time, rename "begin_paint_region" to "begin_paint". This will help us clean up how GDK painting works in the future to allow more creative use of double-buffering.
* quartz: Don't bother storing the paint_clip_regionJasper St. Pierre2014-11-222-56/+0
| | | | It's unused.
* quartz: Move the FullscreenSavedGeometry definition earlierMatthias Clasen2014-10-271-6/+6
| | | | | | | Move the FullscreenSavedGeometry before the first (conditional) use, to fix the build on OS X 10.6. https://bugzilla.gnome.org/show_bug.cgi?id=737561
* quartz: fix build on 10.6 and belowMarcus Karlsson2014-10-272-0/+7
| | | | | | | | | It is not possible to successfully build GTK+ on OS X 10.6 and below since NSFullScreenWindowMask is only available starting with 10.7. Add ifdef guards around setStyleMask: in order to allow it to build on earlier OS X releases. https://bugzilla.gnome.org/show_bug.cgi?id=737561
* gdk: Deprecate static gravitiesBenjamin Otte2014-10-061-13/+0
| | | | | ... and remove all implementations. The API allows to not work "if the server doesn't support it. So from now on, no server does!
* Remove redundant checks for NULLMarek Kasik2014-10-023-20/+5
| | | | | | | | Remove checks for NULL before g_free() and g_clear_object(). Merge check for NULL, freeing of pointer and its setting to NULL by g_clear_pointer(). https://bugzilla.gnome.org/show_bug.cgi?id=733157
* quartz: Get default font size from user fontJesse van den Kieboom2014-08-281-1/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735321
* quartz-dnd: make sure to set source windowJesse van den Kieboom2014-08-271-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=658722
* gdkwindow-quartz: Support native fullscreen modeJesse van den Kieboom2014-08-254-3/+86
| | | | | | This implements native fullscreen mode on OS X >= 10.7. This patch adds tracking of the fullscreen mode if externally modified, as well as toggling the native fullscreen mode of the window as needed.
* Handle resolution changes in the GDK backend codeOwen W. Taylor2014-07-131-2/+2
| | | | | | | | | | | | | | | gdk_x11_display_set_window_scale() affects the interpretation of the Xft/DPI XSETTING - it is substituted inside GDK with the value of Gdk/UnscaledDPI xsetting. However, this change is not propagated to GTK+ and from GTK+ back to gdk_screen_set_resolution() until the main loop is run. Fix this by handling the screen resolution directly in gdk/x11. This requires duplication of code between GDK and GTK+ since we still have to handle DPI in GTK+ in the case that GdkSettings:gtk-xft-dpi is set by the application. https://bugzilla.gnome.org/show_bug.cgi?id=733076
* gdkwidow: Make queue_antiexpose optionalJasper St. Pierre2014-06-211-7/+0
|
* gdkwindow: Don't bother with a return parameter for queue_antiexposeJasper St. Pierre2014-06-211-2/+1
| | | | | Standard refcounting works perfectly well. Don't give us the opportunity for more memory leaks.
* gdkwindow: Remove the ability to call begin_paint_region more than onceJasper St. Pierre2014-06-202-45/+3
| | | | | | | | | | | | | | | Previously, each begin_paint_region added to a stack of current paints, and when end_paint was called, the paint was popped off of the stack and the surface was composited into the parent paint surface. However, the code was broken in the case of a backend like Wayland which didn't keep track of nested calls and simply wiped and returned the native impl backing surface every time. Since this feature is flat out unused by GTK+ and we don't want to really support tricksy things like these for other clients, just remove the feature. If somebody does call begin_paint_region more than once, warn and return without doing anything.
* gdkwindow: Remove the internal cairo_surface used for out-of-band paintingJasper St. Pierre2014-06-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally, the way painting was done in GTK+ was with the "expose-event" handler, where you'd use GDK methods to do drawing on your surface. In GTK+ 2.24, we added cairo support with gdk_cairo_create, so you could paint your graphics with cairo. Since then, we've added client-side windows, double buffering, the paint clock, and various other enhancements, and the modern way to do drawing is to connect to the "draw" signal on GtkWidget, which hands you a cairo_t. To do double-buffering, the cairo_t we hand you is actually on a secret surface, not the actual backing store of the window, and when the draw handler completes we blit it into the main backing store atomically. The code to do this is with the APIs gdk_window_begin_paint_region, which creates the temporary surface, and gdk_window_end_paint which blits it back into the backing store. GTK+'s implementation of the "draw" signal uses these APIs. We've always sort-of supported people calling gdk_cairo_create "outside" of a begin_paint / end_paint like old times, but then you're not getting the benefit of double-buffering, and it's harder for GDK to optimize. Additionally, newer backends like Mir and Wayland can't actually support this model, since they're based on double-buffering and swapping buffers at various points in time. If we hand you a random cairo_t, we have no idea when is a good time to swap. Remove support for this. This is technically a GDK API break: a warning is added in cases where gdk_cairo_create is called outside of a paint cycle, and the returned surface is a dummy that won't ever be composited back onto the main surface. Testing with complex applications like Ardour didn't produce any warnings.
* all: Name more idles and timeoutsBastien Nocera2014-03-261-2/+5
| | | | | | | | | | Following up from 438cd857c49242244dda2923ac447f36464b9e72, name more timeouts and idles. The original grep was missing checking for gdk_threads_add_*() functions (at least for some of the files). https://bugzilla.gnome.org/show_bug.cgi?id=726870
* Implement get_root_origin generically for all backendsJasper St. Pierre2014-03-171-20/+0
| | | | | | | It seems that some backends implemented get_root_origin wrong and returned the client window coordinates, not the frame window coordinates. Since it's possible to implement generically for all windows, let's do that instead of having a separate impl vfunc.
* Remove the return value of GdkWindowImpl::get_root_coordsJasper St. Pierre2014-02-271-5/+3
| | | | | It's unused by callers, and the historical return values are undocumented, so just remove it now.
* Gdk: fix wrong user_data handling in resize_cairo_surface()Giovanni Campagna2014-02-261-4/+2
| | | | | | | | | Instead of destroying the surface in the backend if this is unable to resize, let the core code do it, and do it properly. Based on a patch by Benjamin Otte. https://bugzilla.gnome.org/show_bug.cgi?id=725172
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-2/+2
| | | | Instead of Return value:
* docs: use proper quotations instead of '*'William Jon McCann2014-02-071-1/+1
|
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-3/+3
|
* docs: use proper apostropheWilliam Jon McCann2014-02-072-4/+4
| | | | https://wiki.gnome.org/Design/OS/Typography
* Bug 711298 - "Edit Scheduled Transaction" window way too modalJohn Ralls2014-01-241-2/+0
| | | | | | | | Put dialogs and utility windows in the same level as normal and toolbar windows so that Gtk can control their stacking instead of forcing them, rather unnaturally, to be on top of all other windows, even other application windows, even when another application has focus.
* Move get_key_equivalent() to gdk quartz utils.William Hua2014-01-082-0/+149
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=710351
* quartz: implement gdk_window_set_shadow_width()Ryan Lortie2014-01-063-2/+26
| | | | | | | Use the information to allow dragging windows all the way to the top of the screen (ie: allow the top shadow to go under the menubar). https://bugzilla.gnome.org/show_bug.cgi?id=720374
* quartz: fix manual window moveRyan Lortie2014-01-063-6/+10
| | | | | | | We need to have gdk skip standard processing of events when we are in manual move in addition to manual resize. https://bugzilla.gnome.org/show_bug.cgi?id=720357
* Fix missing return and closing brace.William Hua2013-11-181-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712514
* Quartz: Set the shows-desktop platform settingMatthias Clasen2013-11-151-0/+7
| | | | | OS X shows icons on the desktop, so set this setting to TRUE here.
* Handle recursion from motion event handlersOwen W. Taylor2013-11-111-2/+2
| | | | | | | | | | | | If a motion event handler (or other handler running from the flush-events phase of the frame clock) recursed the main loop then flushing wouldn't complete until after the recursed main loop returned, and various aspects of the state would get out of sync. To fix this, change flushing of the event queue to simply mark events as ready to flush, and let normal event delivery handle the rest. https://bugzilla.gnome.org/show_bug.cgi?id=705176
* Bug 709939 - monitor reconfiguration while GtkOffscreenWindowsCharles Reiss2013-10-111-1/+5
| | | | | exist triggers crash on quartz. Special case the position update to ignore the off-screen windows.
* NULL check on default keymapPhilip Chimento2013-10-111-1/+2
| | | | | Ensure that Quartz's default keymap is not accessed before it is created.
* Quartz: Set the drag context target listJohn Ralls2013-10-101-0/+2
| | | | So that gdk_drag_context_list_targets() actually returns something.
* Bug 705750 Quartz input method doesn't work correctly for Chinese charactersEk Kato2013-08-164-4/+51
| | | | Modified from original for Gtk3.
* Bug 705181 Annoying beep on arrow keysEk Kato2013-08-131-5/+2
| | | | Original patch was a bit excessive, just needed to not forward the command.