summaryrefslogtreecommitdiff
path: root/gdk/quartz
Commit message (Collapse)AuthorAgeFilesLines
* quartz: Actually use the window background PATTERN colorKristian Rietveld2012-10-091-1/+1
| | | | | | | Before we used a window's background color, which resulted in corrupted display in some cases, presumably because we didn't reset the active pattern. This patch seems to eliminate the observed corruption. (cherry picked from commit 0e42cf81f1dad319489e447c6c4e640bed2ab915)
* quartz: Fix garbage content when windows are initially mappedKristian Rietveld2012-09-281-0/+19
| | | | | | The garbage would be visible if any widget enabled the toplevel NSView's CALayer in order to do custom native rendering. (cherry picked from commit 92ea94af5f1a4d0970628b58997192ccf74cab36)
* quartz: Bug 674108 - Hard crash due to wrong NSAutoreleasePool stackingMichael Natterer2012-09-141-16/+29
| | | | | | | | | | Apply patch from Kristian Rietveld which addresses two issues in gdkeventloop-quartz.c: This patch moves the autorelease pool drain and introduces protection against the invalidated ufds. Basically, when we suspect ufds has been invalidated by a recursive main loop instance, we refrain from calling the collect function. (cherry picked from commit 79b3326eaab18b942bd7e03ae8d24544182cb3dd)
* Implement gtk-primary-button-warps-slider GtkSettingKristian Rietveld2012-09-111-0/+65
| | | | | | Make GtkRange honor the setting and implement it in the quartz backend, it proxies the "click in the scroll bar to" property from the OS X PrefPane.
* Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-LionJohn Ralls2012-09-031-1/+3
|
* quartz: add evil casting to make sure time wraps correctly on 32bit machinesMichael Natterer2012-08-231-2/+5
| | | | | | get_time_from_ns_event(): apply patch from Michael Hutchinson which makes sure the returned guint32 wraps correctly on 32 bit machines when the uptime exceeds 2^32 ms.
* Implement gdk_quartz_keymap_lookup_keyJohn Ralls2012-08-221-5/+3
|
* gdk: Don't use GDK_THREADS_ENTER/LEAVE macros internallyMatthias Clasen2012-07-302-8/+8
| | | | | | These are just wrappers for the functions, and we want to deprecate them. Stopping to use them internally is a good first step.
* quartz: Ignore events from all mouse buttons past the resize boundaryKristian Rietveld2012-05-131-9/+21
| | | | | | | Before, right click events were still let through into GDK. In this case, also middle/right button events with x-coordinates in the range [-3, 0] are processed, resulting in failures/crashes in the window finding code because no GdkWindows are present in this range.
* quartz: handle yet another dead tilde variantMichael Natterer2012-05-081-0/+1
| | | | which is delivered by the US-International keyboard layout.
* [quartz] Fix manual resizing of windowsKristian Rietveld2012-04-103-0/+17
| | | | | | | | | | | | | | | | In the Quartz backend, there are two methods by which windows are resized. The first method is fully handled by Quartz and does not appear in the event stream the application resizes. The second method is when we resize windows by ourselves. In OS X this happens when a GTK+ resize grip is used. This resize grip is larger than the Quartz resize grip. When the resize is started outside the "Quartz area", we have to handle it by ourselves. This patch fixes this manual window resizing by ignoring events while we are in the process of resizing (such that the events actually arrive at the sendEvent handler of GdkQuartzWindow where this resize is handled). When the resize has finished we break all grabs such that GDK is not stuck thinking the cursor is still in the resize window.
* Export break_all_grabs() within Quartz backendKristian Rietveld2012-04-102-4/+5
| | | | Function was renamed to _gdk_quartz_events_break_all_grabs().
* gdk: Make query_state() vfunc a void vfuncBenjamin Otte2012-03-091-12/+10
| | | | | | | ... and make sure the backends implement it that way. query_state() return value was ignored in all of GDK and caused crashes when it failed.
* Quartz: Fix incompatible types in assignmentJohn Ralls2012-03-011-2/+2
| | | | | | NSEvent -scrollingDeltaX and -scrollingDeltaY aren't defined before 10.7, so objc assumes that they return a pointer. Trying to cast to a float generates a compiler error.
* quartz: Implement smooth scrollingMichael Natterer2012-03-011-8/+48
| | | | | | | nsevent scrollingDeltaX/Y (available on OSX >= Lion) is used to provide the smooth scrolling values. In any case, old fashioned events are still sent, setting _gdk_event_set_pointer_emulated() if the event contains both smooth and non-smooth values.
* Change FSF AddressJavier Jardón2012-02-2737-111/+37
|
* quartz: implement GdkScreen::get_monitor_workarea()Michael Natterer2012-02-231-1/+25
|
* quartz: make function keys work (again?)Michael Natterer2012-02-231-28/+41
| | | | | | | | | | The F keys have no unicode mapping, and UCKeyTranslate() returns a bogus 0x10 as mapping to unicode. Instead of checking for this random and undocumented return value, simply assign all function keys explicitly. This patch also splits the ill-named "known_keys" array into "modifier_keys" and "function_keys" which is much more obvious. (cherry picked from commit 55f9e5cbaf9c5f6761d7bce7a1672bc1552e2f07)
* GdkScreen: fix precondition checks in the public APIMichael Natterer2012-02-211-2/+1
| | | | | | Move g_return_if_fail() stuff from the backends to the public functions in gdkscreen.c itself, and some fixes for ugly formatting in the various gdkscreen-backend.c files.
* quartz: s/gdk_cursor_ref/g_object_ref/Michael Natterer2012-01-261-2/+2
|
* Bug 667691 - implement gdk_window_restack() for QuartzMichael Natterer2012-01-261-1/+12
| | | | | Apply patch from Paul Davis which implements this missing function. (cherry picked from commit e1c107a094f46d93f7b9bfeb029cf30ecfbedc12)
* quartz: add virtual modifiers already in GDK, just as X11 does itMichael Natterer2012-01-191-0/+7
| | | | | | Key event states will now always contain GDK_META_MASK in addition to GDK_MOD2_MASK. (cherry picked from commit d915d17ff66be926616565865f941289d8a1024b)
* gdk/*: Use g_list_free_full convenience functionJavier Jardón2012-01-051-2/+1
|
* Add gdk_screen_get_monitor_workareaMatthias Clasen2011-12-181-0/+1
| | | | | | | | | | | | The function returns the part of a monitors area that should be used for positioning popups, menus, etc. The only non-trivial implementation atm is in the X backend, all the other backends just return the full monitor area. The X implementation is currently suboptimal, since it requires roundtrips to collect the necessary information. It should be changed to monitor the properties for changes, when XFixes allows to monitor individual properties. https://bugzilla.gnome.org/show_bug.cgi?id=641999
* Turn the private #define for the group-shifting modifier into APIMichael Natterer2011-11-181-0/+3
| | | | | | | Add GDK_MODIFIER_INTENT_SHIFT_GROUP to enum GdkModifierIntent and handle it in gdk_keymap_get_modifier_mask(). Add an X11 impl of the method and return keymap_x11->group_switch_mask. Return 0 from the default impl because we don't know.
* Bug 663856 - Make option-foo accelerators use the right symbolMichael Natterer2011-11-181-5/+11
| | | | | | | | | | | | | | | | | If the keyboard group shifting modifier is *also* a normal accelerator modifier, we need to special case it when calling gdk_keymap_translate_keyboard_state(), so we get the right key symbol for accelerators (for example we want Option-O, not Option-Ø displayed in menu items). This patch should only affect quartz where the Alt key both shifts the group and can be used as accel modifier, and not X11 or Win32 where AltGr is not used for accelerators. - fix quartz' gdk_keymap_translate_keyboard_state() to return the right consumed_modifiers - add _gtk_translate_keyboard_accel_state() which does the special casing - use it everywhere instead of gdk_keymap_translate_keyboard_state()
* quartz: fix a race condition when waking up the CGRunLoopMichael Natterer2011-11-111-3/+6
| | | | | | | | Wake up the run loop unconditionally (don't check if it is waiting) because it might go into waiting state right after we checked for it. Fixes GIMP startup (which has a lot of GIOChannel I/O but zero NSEvents) from several minutes to a few seconds. (cherry picked from commit 0729cdc9a1e8003c41d3ebf20eecfe2d1b29ffbe)
* quartz: include all buttons' state in GdkEventMotion.stateMichael Natterer2011-11-091-17/+2
| | | | (cherry picked from commit 3b5c5710daa337b61c9e2135e3e55c380e5bc991)
* quartz: include all buttons' states in GdkEventButton.stateMichael Natterer2011-11-091-5/+6
| | | | (cherry picked from commit a381e8ea62441b6715ba9bcb0e04332fd914f8b1)
* Bug 663605 - Fix event->state of many event types on quartzMichael Natterer2011-11-081-34/+63
| | | | | | | | Don't try to remember the current keyboard modifier and mouse button states from the last event, because that isn't always right, and don't set event.state = 0 for generated events. Instead, add private functions to get the current states, and implement them with API that retrieves these states independently from an event.
* quartz: handle recursive CFRunLoopsMichael Natterer2011-11-061-20/+29
| | | | | | | | | | | | | | Fixes e.g. crashs when dropping from finder. Turn the "getting_events" boolean into a counter to handle poll_func() being called recursively, and track the loop depth correctly by changing its counter before bailing out in run_loop_observer_callback(). This way we reallocate our autorelease pool at the right time, and don't kill memory that is still in use by outer run loops. Also drain, not release the pool, just for some defensive forward compatibility. (cherry picked from commit ef9a92d225f7257f56c3a8b7b28ddd9a734e38e6)
* quartz: use get_toplevel_from_ns_event in one more placeKristian Rietveld2011-11-061-6/+1
| | | | Fixup needed due to refactoring in GTK+-3.0.
* quartz: make gdk_quartz_osx_version conform to coding styleKristian Rietveld2011-11-061-6/+5
|
* quartz: make test_resize () conform to coding styleKristian Rietveld2011-11-061-16/+15
|
* quartz: Process motion events within windows bounds without window setKristian Rietveld2011-11-061-10/+54
| | | | | | | | | | | | | When an NSEvent does not have the window field set, we already assumed the event was not for us and discarded it. But for NSMouseMoved events we now make an exception, because such events generated after using/clicking the main menu bar have the window field set to NULL while the application window still has focus. We used to experience a loss of motion events after using the menu bar, this could be seen in buttons that stopped prelighting and first clicks often being ignored unless you clicked somewhere else first. These issues are fixed by this patch.
* quartz: Factor out toplevel from NSEvent code into functionKristian Rietveld2011-11-061-9/+25
|
* quartz: Separate out screen_point conversion in functionKristian Rietveld2011-11-061-37/+22
| | | | Reduces code duplication and confusion.
* quartz: remove unused variableKristian Rietveld2011-11-061-5/+0
|
* Quartz: Adapt to GdkWindowImpl api changeMatthias Clasen2011-11-051-0/+2
|
* quartz: don't return FALSE from GdkDevice::query_state()Michael Natterer2011-10-221-5/+0
| | | | Not finding a child window to return is not a failure.
* Quartz, Bug 655057: Eliminate Compiler WarningAlex Corrado2011-10-091-2/+10
| | | | | | When compiled with older SDKs, the original change for this bug caused a compiler warning about NSWindow not being able to handle a setStyleMask message. This tricks the compiler into thinking that it can.
* quartz: also update window position on windowDidResizeKristian Rietveld2011-10-081-0/+5
| | | | When a window goes fullscreen, the resize also changes its size.
* gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and BroadwayMichael Natterer2011-10-071-14/+0
| | | | | | | | | | | | | | | | | In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was implicitly used as implementation for all !X11 backends. In 3.x, when this function was virtualized in GdkDisplayManager, this fallback was moved to the X11 backend and the other backends "equipped" with /* FIXME implement */ implementations of keyval_convert_case() which don't convert anything. Move the fallback code back to gdk/ as default implementation of GdkDisplayManager::keyval_convert_case() and remove its implementations is all backends but X11. Also remove the implementation in Wayland which was a plain copy of what is now the default implementation. (cherry picked from commit f46c1b76d839a03bdc8080bc130fabd1068f2557)
* quartz: don't filter away directly encoded 24-bit UCS charactersMichael Natterer2011-09-281-21/+5
| | | | | | gdk_unicode_to_keyval(uc) returning (uc | 0x01000000) is not an error return value but simply the way to encode 24-bit unicode characters directly as keyvals.
* Bug 659602 - Provide an abstraction for the platform's use of modifier keysMichael Natterer2011-09-271-0/+27
| | | | | | | | Add enum GdkModifierIntent which identifies use cases for modifier masks and GdkKeyMap::get_modifier_mask(). Add a default implementation which returns what is currently hardcoded all over GTK+, and an implementation in the quartz backend. Also add gtk_widget_get_modifier_mask() which simplifies things by doing widget->display->keymap->get_modifier_mask().
* quartz: resolve the modifier confusion on the MacMichael Natterer2011-09-262-8/+18
| | | | | | | - map Alt/Option to MOD1 - map Command to MOD2 - map MOD2 to the virtual Meta - improve/fix (?) group handling in gdkkeys-quartz.c
* Bug 617583 - Dead accents keys don't work in GTK+ applications on OSXJohn Ralls2011-09-091-5/+72
| | | | | | | Handle dead keys in special_ucs_table and have them converted by UCKeyTranslate(), so all dead key combinations can be entered. Later, this should be handled in the input method, just as it's done for X11/Win32.
* Bug 655122: Lion Crashes during resizeJohn Ralls2011-08-131-24/+60
| | | | | Move resizing detection to a separate function and on 10.7 detect resizes on all edges so that they don't result in grabs.
* Bug 655122: Detect OSX version for handling version-dependent specialJohn Ralls2011-08-132-0/+32
| | | | | cases (the one at hand is window resizing, which is handled differently on OSX 10.7 from earlier versions).
* quartz: use already existing current_button_state variableKristian Rietveld2011-07-301-4/+2
|