Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.
https://bugzilla.gnome.org/show_bug.cgi?id=613284
This function makes a better replacement for
gdk_display_get_core_pointer(), wherever it might yet be needed, for
XI2 resorts to XIGetClientPointer(), for the others return the only
core pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=621685
It turns out that my attempt at handling Super, Hyper and Meta better
is causing problems, mostly because Alt and Meta are commonly colocated
in the modmap, and apps do a check for the Alt modifier regularly.
See e.g bug 607697.
On X11 we receive enter notify and motion notify events for a window
regardless of its focus state. On Mac OS X this is not the case. This
commit improves the semantics to overcome this difference. It improves
on my earlier patch that sent a motion notify event when a window became
main.
Instead of sending a motion notify when a window becomes main, we now
send one when a window becomes key, which comes closest to a window
getting focus in X11. This motion notify is needed because Mac OS X does
not send motion events when an application is inactive (none of its
windows have focus), these events are sent in X11. This dummy motion
notify event (with current coordinates of the mouse cursor) allows an
application to get its prelight and other state right when it gets focus
and thus user attention.
Another change is to send an enter notify event when updating the
tracking rectangle of a GdkQuartView and the mouse cursor is currently in
this rectangle. This rectangle is at least updated on window creation.
This enter notify event is important for the case where a new window
appears right below the mouse cursor. The window has to receive an enter
notify event for the subsequent events to be processed correctly. Mac
OS X does not send one in this case, so we generate it ourselves.
Both of these synthesized events have to go through
_gdk_windowing_got_event() for updating statekeeping, etc.
append_event() has a boolean flag now to make this convenient.
These have been introduced in Leopard and default to int and unsigned int.
In 64-bit Snow Leopard they are long and unsigned long. This caused issues
with the getRectsBeingDrawn message which needs a pointer to a NSInteger
(long on 64-bit!) but we passed in an integer. Surprisingly this problem
was visible when compiling with -O0 (segfault), but *not* when compiling
with -O1. Other messages were NSInteger is now needed have also been
adapted.
Since NSInteger and NSUInteger are not available on Tiger, a define
has been added to add typedefs for these when they have not been defined
by the system headers.
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.
https://bugzilla.gnome.org/show_bug.cgi?id=600158
We have to do this, especially after the screen containing the menubar
has changed. Such more larger changes in monitor geometry will cause
changes to how monitors are laid out in the root window. The position
coordinates of the windows will have to be updated to reflect their
position in the new layout.
The Quartz port now supports arbitrary multiple monitor layouts instead
of only monitors are were laid out horizontally. This builds on the
reworked coordinate translation done in a previous commit.
The root window contains all the monitors attached to a Mac. The
coordinate transformation now both translates the x and y coordinate,
translating it from the Cocoa monitor coordinate space to the GDK
coordinate space. How monitors are laid out in the root window differs
between Cocoa and GDK, which is why it is important to translate based
on the root window to get multi monitor setups to work properly.
We have replaced the old y coordinate transformation function with
new functions that translate both the x and y coordinate.
When creating new toplevels, we have to determine the Cocoa screen on
which the toplevel should appear and translate the coordinates according
to that screen.
This change also fixes event handling in case there is a monitor left
of the screen containing the menu bar. In such a case all coordinates
on the left monitor are negative. Event handling broke, because of
_gdk_quartz_window_find_child() checking bounds. Now that coordinates
are always properly translated to GDK coordinate space, in which negative
coordinates do never occur, the checks here will work properly.
Using this we can update our internal monitor/screen layout state
and emit the GdkScreen::size-changed signal. Work has not
completely finished on this yet, see bug 596238.
Add dummy for _gdk_input_window_crossing (). Set both input_window_destroy
and input_window_crossing pointers in the Impl struct.
Reported by John Ralls.
This has two advantages:
1) In many backends, this is faster as we can terminate the window
hierarchy traversal earlier
2) When used in gdkdisplay.c::get_current_toplevel() to get the
current toplevel that has the pointer we now correctly return
a toplevel with the pointer in it where the pointer is inside
some foreign subwindow of a toplevel window.
The second advantage fixes some bugs in client side event generation
when the pointer is inside such a foreign child window.
Based on first patches by Christian Hergert. Change
screen_get_monitor_geometry() so that it translates the layout of the screens
from Cocoa layout to GDK layout. In Cocoa, the screen locations
are specified in Cocoa geometry, as well as that GDK uses a different way
to place individual monitors in the root window. For now only monitors
that are laid out horizontally are supported (see the FIXMEs in the source),
in bug 596238 we will track future work to get things fully right.
Modify _gdk_quartz_window_get_inverted_screen_y() to take the differences
in screen layout between Cocoa and GDK into account. Also this function
is subject to future work.
Explicitly handle resizing by leaving all events in the lower right 15x15
corner to Cocoa, if the window shows a resizing indicator. Some
applications may have widgets allocated in this area. Generally, these
widgets are likely larger than 15x15 so they can still be hit. Often
scroll bars are found in this area and these can also be manipulated by
other means. Since this is the only way of resizing windows on Mac OS X,
it is too important to keep it broken.
Make the quartz backend support the new queued translations. We do this
by keeping our own copy of the region that has been set to need display.
Using this region we can intersect by the given area, translate this and also
set needs display for the resulting area.
On startup, the root window got assigned the size of the main screen.
But, the GdkScreen has the width of all screens/monitors connected to the
machine. Change this so that in _gdk_windowing_window_init, we assign
the width/height of all monitors to the root window width, height.
Should fix bug 594738.
The quartz backend simulates the semantics of XGrabPointer, as a part of
this it checks the event mask of the grab. However, implicit grabs on X
do not go through XGrabPointer and thus the quartz backend should not check
the event mask for these. This fixes various "the UI got stuck" cases.
The X11 queue_translation operation uses NextRequest to get the serial
of the XCopyArea operation where the translation should end. However,
if the gc passed to gdk_draw_drawable has a non-flushed clip region
(which it commonly has now for the window clipping) then the next
operation will be the GC flush, not the XCopyArea.
To handle this right we now pass in the GC to be used to
queue_translation and ensure that it is flushed before calling
NextRequest().
This seems to more or less fix the build. On Tiger there are still issues
with libresolv missing on the link line, I will figure out what's up with
that soonish.
Turns out pygtk build broke due to the argument addition to draw_drawable.
So, we now add a new vfunc for the new draw_drawable and are thus
backwards compat.
Use the same code path to get a CGContext for both gdk_draw_* and
gdk_cairo_create and make sure we unlockFocus in both cases. This
fixes the broken rendering in GtkRuler. Also use an average of flush
intervals when checking whether we can flush or not, since otherwise
we get too sensitive and block almost all explicit flushes that are
caused by mouse movements for example.
Get rid of invalidate_maybe_recurse and process_updates. Implement
_gdk_windowing_{before,after}_process_all_updates(), and keep track of
when we're inside process_all_updates in the common code so we know
when to flush windows. Implement
_gdk_windowing_window_process_updates_recurse by means of
setNeedsDisplayInRect: displayIfNeeded. Use the added window argument
in begin_paint_region to get the right window (the paintable is always
the impl window now).
This fixes a mismatch in save/release gstate for the CGContext. If
this function is ever used for pixmaps, we need to add support for
that, probably will have to do so soon.
The one that puts windows outside the screen and moves them in when
showing. It might not be needed anymore and the workaround doesn't
work with the client-side window branch anyway because the window is
already mapped when we get showed for some reason.
The history before this was kind of twisted as several different
approaches were tested, so that was all squashed into this initial
commit to hide the uninteresting changes and files that were later
removed.
2009-01-26 Richard Hult <richard@imendio.com>
Bug 566628 – gdk_display_close always asserts on win32 and quartz
* gdk/quartz/gdkdisplay-quartz.c
(_gdk_windowing_set_default_display): Copy fix for bug #566628
from the win32 backend: Allow also a NULL parameter in the
g_assert().
svn path=/trunk/; revision=22223
2008-11-12 Richard Hult <richard@imendio.com>
Bug 550942 – [patch] Rework of gdkeventloop-quartz.c
* gdk/gdk.c:
* gdk/gdkinternals.h: Add eventloop debug facility.
* gdk/quartz/gdkeventloop-quartz.c: Big rework of the quartz
mainloop integration, patch from Owen Taylor. See bug #550942 for
the details.
svn path=/trunk/; revision=21783
2008-11-12 Richard Hult <richard@imendio.com>
Bug 558586 – handling of keyboard under darwin (quartz)
* gdk/quartz/gdkkeys-quartz.c: Follow up on this bug, only use the
new API when building on 64-bit, since there are still old non-xml
layouts used out there we don't want to break them. (For 64-bit
those layouts doesn't work so we don't have a choice there.)
svn path=/trunk/; revision=21782
2008-11-06 Richard Hult <richard@imendio.com>
Bug 558586 – handling of keyboard under darwin (quartz)
* gdk/quartz/gdkkeys-quartz.c: (maybe_update_keymap): Patch from
Arnaud Charlet to replace use of deprecated keyboard layout API
with the new TIS API available in 10.5. The old code is still used
when building for 10.4.
svn path=/trunk/; revision=21763
2008-11-05 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(get_keyboard_modifiers_from_ns_event), (create_key_event): Revert
(at least for now) the alt/cmd switching since it breaks the
"alt-gr" functionality of alt which makes it impossible to input
lots of characters.
svn path=/trunk/; revision=21761
2008-11-05 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_impl_quartz_begin_paint_region): Set the fill color
outside the loop.
svn path=/trunk/; revision=21759
2008-10-27 Richard Hult <richard@imendio.com>
Bug 557894 – Wrong return value for
gdk_pointer_grab_info_libgtk_only()
* gdk/quartz/gdkevents-quartz.c:
(gdk_pointer_grab_info_libgtk_only): Return TRUE when there is a
pointer grab. Patch by Owen Taylor.
svn path=/trunk/; revision=21722
2008-10-09 Richard Hult <richard@imendio.com>
Bug 550342 – Splash screens have a caption
* gdk/quartz/gdkwindow-quartz.c: (_gdk_window_new),
(gdk_window_set_decorations): Patch from Marianne Gagnon to make
splash windows borderless.
svn path=/trunk/; revision=21617
2008-08-15 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c (gdk_quartz_draw_drawable): Some
aftermath of the fix of bug #543868. Clip and flip to the source,
not the destination. Don't save/restore the gstate, it's already
done when getting/releasing the context.
svn path=/trunk/; revision=21136
2008-07-20 Sven Herzberg <sven@imendio.com>
reviewed by: Richard Hult
Fixes#543868: GdkPixmap is upside down on quartz
* gdk/quartz/gdkdrawable-quartz.c (gdk_quartz_draw_drawable): flip the
coordinate space from GTK+ orientation to CoreGraphics orientation
before calling CoreGraphics code
* gdk/quartz/gdkgc-quartz.c (gdk_quartz_draw_tiled_pattern): drop the
coordinate space flipping (we always get it right, now)
* gdk/quartz/gdkpixmap-quartz.c
(gdk_pixmap_impl_quartz_get_context): flip the coordinate space when
creating the CGContextRef
svn path=/trunk/; revision=20870
2008-07-20 Sven Herzberg <sven@imendio.com>
reviewed by: Richard Hult
Extracted the CGContextRef creation into a virtual function of
GdkDrawableImplQuartz; implement get_context() for GdkPixmap and
GdkWindow
* gdk/quartz/gdkdrawable-quartz.c
(gdk_quartz_drawable_get_context): dropped the different
implementations; forward to the virtual function now
* gdk/quartz/gdkdrawable-quartz.h: added the virtual function
* gdk/quartz/gdkpixmap-quartz.c
(gdk_pixmap_impl_quartz_get_context),
(gdk_pixmap_impl_quartz_class_init): implemented get_context()
* gdk/quartz/gdkwindow-quartz.c
(gdk_window_impl_quartz_get_context),
(gdk_window_impl_quartz_class_init): implemented get_context()
svn path=/trunk/; revision=20869
2008-07-01 Richard Hult <richard@imendio.com>
Some aftermath from the window impl cleanups:
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_merge_child_input_shapes): Rename and export again.
(gdk_window_quartz_get_offsets): Make static.
svn path=/trunk/; revision=20723
2008-05-26 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (gdk_screen_get_setting): Try
setting the default font, might need to tweak this.
svn path=/trunk/; revision=20181
2008-05-19 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_hide),
(gdk_window_fullscreen), (gdk_window_unfullscreen): Use
SetSystemUIMode instead of hiding and showing the menubar.
svn path=/trunk/; revision=20114
2008-05-17 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_impl_quartz_invalidate_maybe_recurse):
(gdk_window_quartz_update_idle): Use gdk_threads_add_idle instead
of g_idle_add. Add a temporary check if the window is already in
the updates list, since update_area currently doesn't always match
the backend's state, see bug #530801.
svn path=/trunk/; revision=20108
2008-05-12 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
* gdk/quartz/gdkquartz.h: Remove special casing of menu key events
as it's no longer necessary; instead the added quartz API to get
the nsevent from an event should be used. Also move the global
filter up so it's done before the check for window-less events.
svn path=/trunk/; revision=20100
2008-05-08 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkeventloop-quartz.c (poll_func): Only set the fake
fd's revents, not the first one. Fixes bug #531056, spotted by
Yevgen Muntyan.
svn path=/trunk/; revision=20086
2008-05-06 Richard Hult <richard@imendio.com>
* gdk/gdkevents.c: (gdk_event_copy), (gdk_event_free):
* gdk/gdkinternals.h: Add private backend data to events, and
handle it when copying/freeing events. Currently only needed in
the quartz backend.
* gdk/directfb/gdkevents-directfb.c:
* gdk/quartz/gdkevents-quartz.c:
* gdk/win32/gdkevents-win32.c:
* gdk/x11/gdkevents-x11.c: (_gdk_windowing_event_data_copy)
(_gdk_windowing_event_data_free): Add stubs for X11, win32 and
directfb. Implement for quartz. Part of fixing bug #473822.
svn path=/trunk/; revision=20078
2008-05-05 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkmain-quartz.c (_gdk_windowing_init): Initalize
framework if there is one.
svn path=/trunk/; revision=20075
2008-05-04 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkkeys-quartz.c (maybe_update_keymap): Check if
gdk_unicode_to_keyval() worked before using the result. Makes
function keys work, bug #530156. Also add F16 to the function key
map.
svn path=/trunk/; revision=20071
2008-04-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(get_keyboard_modifiers_from_ns_event), (create_key_event): Map
Alt to Alt and Cmd to Meta. This is not only more logical but also
makes it easier to have Mac-like behavior.
svn path=/trunk/; revision=20054
2008-03-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (gdk_event_translate),
(_gdk_quartz_events_trigger_crossing_events): Defer the generated
event to the mainloop and don't generate one at all if the
toplevel didn't change. Use the actual window and not the toplevel
as event window. These changes make the generated crossing events
match the X11 behavior and fixes issues with e.g. tooltips,
comboboxes and menus.
* gdk/quartz/GdkQuartzView.c: Don't update the tracking rect if
the view has no window, it will be updated as soon as it's put
inside a window.
* gdk/quartz/gdkwindow-quartz.c:
(_gdk_quartz_window_debug_highlight): Make it possible to track
multiple windows with debug highlighting.
(show_window_internal): Remove workaround for tooltips and popups
that is no longer needed with the above changes.
svn path=/trunk/; revision=19951
2008-03-25 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(_gdk_quartz_events_trigger_crossing_events): Bail out early if we
can't find a matching window.
* gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Add a
comment, and only trigger an event for non-temp windows, fixes
problems for tooltips caused by the workarounds for the
problematic tracking rect API.
svn path=/trunk/; revision=19934
2008-03-25 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_all_updates): Plug a leak and add a
check that we have a toplevel before accessing it.
svn path=/trunk/; revision=19933
2008-03-14 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_all_updates): Patch from Paul Davis,
only flush the toplevel once per update.
svn path=/trunk/; revision=19871
2008-02-24 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c: Prevent hidden windows from being
shown without gdk's control when clicking the dock icon.
svn path=/trunk/; revision=19638
2008-02-24 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkeventloop-quartz.c: (got_fd_activity), (poll_func):
Use the subtype field for the custom event that is used to wake up
the mainloop so we can have other custom event types.
* gdk/quartz/gdkevents-quartz.c:
(_gdk_quartz_events_trigger_crossing_events):
* gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Create
crossing events after showing a window if necessary, to work
around problems with the tracking rect API.
svn path=/trunk/; revision=19637
2008-02-20 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_decorations): Set
the right window level and shadow after recreating the window.
* gdk/quartz/GdkQuartzView.c: (drawRect): Invalidate the shadow if
necessary after drawing (bug #517338).
svn path=/trunk/; revision=19622
2008-02-17 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c: (showAndMakeKey): Update the
position after showing the window since the window manager might
not place it where we requested in the first places.
svn path=/trunk/; revision=19605
2008-02-17 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (show_window_internal),
(_gdk_quartz_window_detach_from_parent),
(_gdk_quartz_window_attach_to_parent), (gdk_window_focus): Clear
the toplevel ordering list in all places where the order is
potentially changed. Fixes mouse focus issues for windows with
a transient parent set.
svn path=/trunk/; revision=19604
2008-02-17 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c
(_gdk_quartz_events_update_mouse_window): Highlight the mouse
window when event debugging is enabled.
svn path=/trunk/; revision=19603
2008-02-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (create_scroll_event): Add state
to the scroll event (bug #516757, Paul Davis).
svn path=/trunk/; revision=19598
2008-02-15 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Adapt to the change to use frame
instead of bounds when resizing windows.
svn path=/trunk/; revision=19580
2008-02-14 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_focus): Using
makeKeyWindow unfortunately doesn't work in all cases, we must use
makeKeyAndOrderFront.
svn path=/trunk/; revision=19568
2008-02-14 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (get_fullscreen_geometry),
(gdk_window_hide), (gdk_window_fullscreen),
(gdk_window_unfullscreen): Make sure we leave fullscreen mode if
the window is hidden.
svn path=/trunk/; revision=19567
2008-02-14 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c: Set frame, not bounds when
resizing to be consistent and to avoid introducing an internal
transform in the view.
svn path=/trunk/; revision=19566
2008-02-13 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkcolor-quartz.c: (gdk_colormap_alloc_colors): Fix
the return value (return number of colors that failed), and handle
RGBA colormap.
(gdk_colormap_free_colors): Fix typo in comment.
svn path=/trunk/; revision=19557
2008-02-08 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Ignore the
delta from the NSEvent for now, generating multiple scroll events
results in a lot of events getting queued up and things get really
slow.
svn path=/trunk/; revision=19499
2008-01-31 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Another attempt at fixing focus
issues with undecorated windows. Revert the change done on
2008-01-25 and fix it by using the view's bounds instead. The
bounds will always be up to date when setting up the tracking
rect, so this should be more robust.
svn path=/trunk/; revision=19445
2008-01-25 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Don't recreate a tracking rect if it
didn't change, fixes focus event issues for undecorated windows.
svn path=/trunk/; revision=19402
2008-01-15 Michael Natterer <mitch@imendio.com>
* gdk/gdkdisplay.h
* gdk/gdkdrawable.h
* gdk/gdkevents.h
* gdk/gdkpango.h
* gdk/gdkregion.h
* gdk/gdkrgb.h
* gdk/gdkwindow.h: made more struct pointer and array parameters
const. GDK should now be constified as far as possible without
breaking source compatibility. Includes some minor cleanup like
indentation and s/nfoo/n_foo/ (bug #508544).
* gdk/gdkdisplay.c
* gdk/gdkdraw.c
* gdk/gdkevents.c
* gdk/gdkpango.c
* gdk/gdkregion-generic.c
* gdk/gdkrgb.c
* gdk/directfb/gdkdisplay-directfb.c
* gdk/directfb/gdkwindow-directfb.c
* gdk/quartz/gdkdisplay-quartz.c
* gdk/quartz/gdkwindow-quartz.c
* gdk/win32/gdkdisplay-win32.c
* gdk/win32/gdkwindow-win32.c
* gdk/x11/gdkdisplay-x11.c
* gdk/x11/gdkwindow-x11.c: changed accordingly.
svn path=/trunk/; revision=19372
2007-12-20 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c:
* gdk/quartz/GdkQuartzWindow.h: Make manual resizing smoother by
processing events after changing the size.
svn path=/trunk/; revision=19206
2007-12-10 Richard Hult <richard@imendio.com>
* gdk/quartz/Makefile.am:
* gdk/quartz/gdkquartz.h:
* gdk/quartz/gdkwindow-quartz.c: Install backend specific
header (bug #405915). Also add a getter for the toplevel nswindow.
svn path=/trunk/; revision=19151
2007-12-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_drawable_get_context),
(gdk_quartz_drawable_release_context):
* gdk/quartz/gdkeventloop-quartz.c: (gdk_event_prepare),
(gdk_event_check), (gdk_event_dispatch), (poll_func):
* gdk/quartz/gdkwindow-quartz.h: Replace the autorelease pools
used for each drawing context and in prepare, dispatch and poll
with one that exists across each main loop iteration. Fixes leaks
on leopard and protects against future leaks introduce when the
underlying system changes again (bug #492977).
svn path=/trunk/; revision=19149
2007-12-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
Fix the check for no changes to position and size.
svn path=/trunk/; revision=19147
2007-12-10 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Ignore drawRect calls with zero
sized areas at (0, 0), patch from Paul Davis.
svn path=/trunk/; revision=19145
2007-12-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkeventloop-quartz.c:
(_gdk_quartz_event_loop_get_pending),
(_gdk_quartz_event_loop_check_pending),
(_gdk_quartz_event_loop_release_event), (gdk_event_prepare),
(gdk_event_check), (gdk_event_dispatch):
* gdk/quartz/gdkevents-quartz.c: (gdk_events_pending)
(_gdk_events_queue): Fix a bug where we could end up trying to
handle the same event more than once. Based on patch from Paul
Davis.
svn path=/trunk/; revision=19143
2007-12-03 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_impl_quartz_begin_paint_region): Don't crash when a
parent relative bg pixmap is set, and no parent has a bg
pixmap. Fixes bug #500804.
svn path=/trunk/; revision=19100
2007-11-21 Richard Hult <richard@imendio.com>
* gdk/quartz/Makefile.am: * gdk/quartz/gdktestutils-quartz.c: Add
stubs for the testing functions to fix the build.
svn path=/trunk/; revision=19023
2007-11-12 Sven Herzberg <herzi@imendio.com>
Reviewed by Richard:
* gdk/quartz/gdkquartz.h: include <gdk/gdkprivate.h> with angle
brackets and not with quotation marks
svn path=/trunk/; revision=18987
2007-11-04 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkkeys-quartz.c: (maybe_update_keymap): Make shift
tab work with unicode layouts (e.g. all Leopard layouts), fixes
bug #493404.
svn path=/trunk/; revision=18967
2007-11-03 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c:
* gdk/quartz/GdkQuartzWindow.h: Make the grab breaking on window
move work on Leopard (as well as Tiger) by ignoring which mouse
button is pressed.
svn path=/trunk/; revision=18964
2007-11-01 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c:
* gdk/quartz/GdkQuartzWindow.h:
* gdk/quartz/gdkdnd-quartz.c:
* gdk/quartz/gdkquartz.h:
* gtk/gtkdnd-quartz.c: Redo the fix for bug #492117, by adding a
getter for the private drag context info so we don't need to
expose so much in the public quartz header file.
svn path=/trunk/; revision=18959
2007-10-31 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Fix build warning (trackingRect should be
0, not nil).
svn path=/trunk/; revision=18953
2007-10-24 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (update_toplevel_order): Use an
autorelease pool.
svn path=/trunk/; revision=18946
2007-10-23 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_raise, gdk_window_lower, gdk_window_new,
_gdk_windowing_window_destroy): Maintain a list for the stacking
order of windows. Implement lower and raise for child windows. The
list for toplevels is created on demand, and cleared when a window
gets or resigns main status and when new windows are created.
(find_child_window_helper): Use the sorted list to go through
windows from top to bottom. Take any titlebar in consideration for
toplevels, to stop events from sometimes punching through (bugs
#473813 and #489370).
svn path=/trunk/; revision=18940
2007-10-08 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_focus): Implement,
patch from Paul Davis.
svn path=/trunk/; revision=18897
2007-10-08 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
Ignore if there are no changes, fixes bug #467269. Patch from
Jonathan Dempsey.
svn path=/trunk/; revision=18896
2007-10-08 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
Patch from Paul Davis to implement this in terms of scrollRect,
fixes bug #478377.
svn path=/trunk/; revision=18895
2007-10-02 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_move),
(gdk_window_resize): Don't do anything while in fullscreen mode.
(gdk_window_set_decorations): Update the size of the window after
showing/hiding the title bar so the size of the content area
doesn't change.
(gdk_window_get_decorations): NSBorderlessWindowMask is 0, so
don't try to check it as a bit being set.
(gdk_window_fullscreen), (gdk_window_unfullscreen): Implement.
svn path=/trunk/; revision=18875
2007-09-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (_gdk_windowing_window_destroy):
Patch from William Pitcock: Ungrab windows if necessary when they
are destroyed, fixes bug #473441.
svn path=/trunk/; revision=18727
2007-08-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_decorations,
gdk_window_get_decorations): Implement those. Based on patch from
Stefan Gehn, bug #459459.
svn path=/trunk/; revision=18704
2007-08-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_keep_above,
gdk_window_set_keep_below): Patch from Stefan Gehn to implement
those, bug #459667.
svn path=/trunk/; revision=18703
2007-08-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkimage-quartz.c: (_gdk_quartz_image_copy_to_image):
Patch from Stefan Gehn to implement copying from a pixmap, bug
#348493.
svn path=/trunk/; revision=18702
2007-07-31 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_get_geometry):
Implement, fixes bug #405868. Based on patch from metz81@web.de.
svn path=/trunk/; revision=18560
2007-07-18 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkcursor-quartz.c (gdk_cursor_new_for_display): Ref
the cursor in the cached case.
svn path=/trunk/; revision=18490
2007-07-13 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkevents-quartz.c: (gdk_window_is_ancestor): Move
from here...
* gdk/quartz/gdkwindow-quartz.c: (_gdk_quartz_window_is_ancestor):
...to here.
(_gdk_windowing_window_destroy): Update the mouse window if the
destroyed window is an ancestor of the current one, not only if
they are the same.
(gdk_window_hide): Update the mouse window here too.
svn path=/trunk/; revision=18467
2007-07-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_new),
(show_window_internal), (gdk_window_show), (gdk_window_hide): Add
hack to workaround the broken tracking rect implementation in
quartz, that doesn't seem to produce events if the window shows up
under the mouse.
svn path=/trunk/; revision=18440
2007-07-07 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c ([GdkQuartzWindow -windowDidResignMain:])
([GdkQuartzWindow -windowDidBecomeMain:]):
* gdk/quartz/gdkwindow-quartz.c (_gdk_quartz_window_did_resign_main)
(_gdk_quartz_window_did_become_main, gdk_window_hide)
(_gdk_windowing_window_destroy): Keep a stack of main windows and
select the most recent one when hiding/closing the current one.
svn path=/trunk/; revision=18396
2007-07-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkwindow-quartz.c:
* gdk/quartz/GdkQuartzWindow.c: Fix (de)miniaturizing transient
windows, by (un)setting the parent before and after miniaturizing.
svn path=/trunk/; revision=18388
2007-07-03 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: Keep track of button state and
include it in key events. Needed for gimp's selection tools and
fixes bug #453411.
svn path=/trunk/; revision=18369
2007-07-03 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (create_key_event): Include
modifier state in key release events. Fixes bug #453413.
svn path=/trunk/; revision=18367
2007-06-30 Richard Hult <richard@imendio.com>
Continue the event handling cleanup:
* gdk/quartz/gdkevents-quartz.c: (synthesize_crossing_events):
Don't do anything if the old and new windows are the same,
simplifies the callers.
(find_mouse_window_for_ns_event): Always return a window (root
instead of NULL). Remove unneccessary check for the current mouse
window being NULL, that was a workaround for a now fixed
bug. Convert to root coordinates if we don't find a window.
(synthesize_crossing_events_for_ns_event): Simplify and add
comment.
svn path=/trunk/; revision=18316
2007-06-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(synthesize_crossing_events_for_ns_event): Simplify (get the
origin directly from the window).
svn path=/trunk/; revision=18315
2007-06-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (create_crossing_event),
(synthesize_crossing_events), (find_mouse_window_for_ns_event),
(synthesize_crossing_events_for_ns_event): No need to special case
the root window now that it has the right size.
svn path=/trunk/; revision=18314
2007-06-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
* gdk/quartz/gdkevents-quartz.c: Improve comments in those
files. Add a debugging helper to print out information about a
window.
svn path=/trunk/; revision=18313
2007-06-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_get_origin): Make
this work properly for the root window.
svn path=/trunk/; revision=18311
2007-06-30 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Improve the tracking rect updating:
- No need to override setFrame.
- Use our own size instead of the bounds from for the view as it's
not always updated before the tracking rect.
- Only reset the tracking rect if the new window is nil).
* gdk/quartz/GdkQuartzWindow.c: Update the bounds of the content
view when the window size changes.
svn path=/trunk/; revision=18309
2007-06-25 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Don't steal
menu events while the keyboard is grabbed.
svn path=/trunk/; revision=18231
2007-06-25 Richard Hult <richard@imendio.com>
* gdk/quartz/Makefile.am:
* gdk/quartz/xcursors.h:
* gdk/quartz/gdkcursor-quartz.c: Fallback to X cursors for the
ones that OS X doesn't provide. Fixes bug #327912.
svn path=/trunk/; revision=18229
2007-06-20 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_new):
* gdk/quartz/GdkQuartzWindow.c (windowDidResize): Don't create or
update the tracking rect in the window, move it to the view where
it belongs.
* gdk/quartz/GdkQuartzView.c (updateTrackingRect)
(viewDidMoveToWindow, viewWillMoveToWindow)
(setFrame, setBounds): Create and update the tracking rect here.
svn path=/trunk/; revision=18197
2007-06-17 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Forward
Mac OS menu shortcut events to the right menu.
svn path=/trunk/; revision=18178
2007-06-17 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (gdk_event_translate)
(synthesize_crossing_events_for_ns_event)
(find_window_for_ns_event): More refactoring of the event
handling: Extract synthesizing of crossing events from
find_window_for_ns_event so that it doesn't have any side effects,
and call the new function from gdk_event_translate instead.
svn path=/trunk/; revision=18176
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (find_window_for_ns_event),
(gdk_event_translate): Remove pointless logging for unhandled events.
Activate the application on non-left clicks, since that is only done
for left clicks and we depend on it to get events routed properly for
context menus and other popup windows.
svn path=/trunk/; revision=18175
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (gdk_event_translate): Ignore
events and break any grabs while the window is being dragged.
svn path=/trunk/; revision=18165
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_transient_for):
Defer setting the parent until the window is shown, otherwise it
gets unconditionally shown here.
svn path=/trunk/; revision=18164
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (find_mouse_window_for_ns_event):
Move the checks for no window or a non-GDK window from here...
(gdk_event_translate): ...to here. Reorder the code so that we
detect the cases where we need to break grabs before bailing
out.
svn path=/trunk/; revision=18161
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (gdk_event_translate)
(break_all_grabs): Break out into a separate function.
svn path=/trunk/; revision=18160
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c: (isInMove): Implement, to be used
to detect if the window is currently being moved with the mouse.
svn path=/trunk/; revision=18159
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_transient_for):
Don't set parent/child relationship for tooltip windows since that
moves the parent window to the front, due to the tooltip having a
high window level.
svn path=/trunk/; revision=18158
2007-06-10 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c (gdk_quartz_draw_arc): fix
angles by flipping the coordinate system back to its original y
direction. The implementtion is still broken for ellipses, will
have to simulate them using bezier curves.
svn path=/trunk/; revision=18095
2007-06-08 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c: add utility function
gdk_quartz_fix_cap_not_last_line() which fixes the coordinates for
GDK_CAP_NOT_LAST lines at least for horizontal and vertical lines.
(gdk_quartz_draw_segments)
(gdk_quartz_draw_lines): use it here.
svn path=/trunk/; revision=18080
2007-06-07 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkgc-quartz.c: add gdk_gc_quartz_init() and set
some values to the defaults used by X11.
(gdk_quartz_gc_set_values): really set cap_style when
GDK_GC_CAP_STYLE is in the mask, not line_style.
svn path=/trunk/; revision=18079
2007-06-07 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkgc-quartz.c (_gdk_quartz_gc_update_cg_context):
use the same code for GDK_XOR as for GDK_INVERT. Xor with an
arbitrary color is impossible to implement with quartz.
svn path=/trunk/; revision=18077
2007-06-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (find_mouse_window_for_ns_event)
(find_window_for_ns_event): Rework how we get the event window:
don't get the window from the NSEvent, always use the mouse window
instead. Fix mouse window tracking by only using MouseExited for
non-gdk windows, and to always use the NSEvent window to get the
right gdk window in MouseEntered. Add comments to the code. Fixes bug
#350460.
svn path=/trunk/; revision=18065
2007-06-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (get_converted_window_coordinates):
Don't do anything if the two windows are the same.
(find_window_for_ns_event): Translate coordinates to be relative
the grab window when appropriate.
svn path=/trunk/; revision=18064
2007-06-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c
(_gdk_quartz_events_update_mouse_window): Ignore if the old and new
windows are the same.
svn path=/trunk/; revision=18049
2007-06-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events):
Update comment to be more clear and print a warning if we try to
create a crossing event without knowing what the current mouse
window is, to help track down focus bugs.
* gdk/quartz/gdkevents-quartz.c
(_gdk_quartz_events_update_focus_window): Fix indentation.
svn path=/trunk/; revision=18047
2007-06-05 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c: Don't let temp windows become key
window.
svn path=/trunk/; revision=18046
2007-06-04 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(show_window_internal): Don't try to make temp windows key
windows, fixes problem introduced below.
svn path=/trunk/; revision=18040
2007-06-03 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (create_crossing_event): Set the key
modifier state.
svn path=/trunk/; revision=18017
2007-06-03 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: Make pointer grab emulation work a bit
better:
(gdk_display_pointer_is_grabbed): Do what the docs say and don't
consider implicit grabs here.
(gdk_pointer_grab): Overriding a grab by the same app should always be
succesful.
(gdk_event_translate): Implicit grabs should not be owner events.
svn path=/trunk/; revision=18016
2007-06-01 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(get_converted_window_coordinates), (create_crossing_event): Fix the
coordinates in crossing events so they are relative to the right
window.
svn path=/trunk/; revision=18007
2007-06-01 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.[ch]: Make function naming
consistent for the various functions that retrieve data from an
event.
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkwindow-quartz.[ch]: Remove the now unused
_gdk_quartz_window_find_child_by_point() function.
svn path=/trunk/; revision=18006
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (get_child_coordinates_from_ancestor)
(get_ancestor_coordinates_from_child): Break out code that was
repeated into separate functions and call them instead.
(find_window_for_mouse_nsevent): Break out this from
find_window_for_nsevent to make the code clearer.
(find_window_for_nsevent): Use the above and fix the returned
coordinates in the process so that they are always relative the
found window, both for the normal case and during grabs. Still
needs fixing for the case where we get nsevents for a window other
than than grab window during grabs.
svn path=/trunk/; revision=17971
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Fix typo,
we need both press and release in the mask to trigger implicit
grabs.
svn path=/trunk/; revision=17970
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (pointer_ungrab_internal): Reset
all the grab state, to help debugging.
(gdk_event_translate): Use pointer_ungrab_internal instead of
duplicating the code here.
svn path=/trunk/; revision=17969
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkwindow-quartz.c (find_child_window_helper)
(_gdk_quartz_window_find_child): Refactored version of
_gdk_quartz_window_find_child_by_point, that doesn't return any
coordinates as the users of this function already have the
coordinates and need to translate them differently.
(_gdk_windowing_window_get_pointer): Fixup coordinate translation.
(_gdk_windowing_window_at_pointer): Likewise.
svn path=/trunk/; revision=17968
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c
(find_window_interested_in_event_mask): Don't traverse beyond the
toplevel of the passed in window.
svn path=/trunk/; revision=17967
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_init): Set
a size for the root window.
svn path=/trunk/; revision=17966
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: Add comments about what various
coordinates are relative to.
svn path=/trunk/; revision=17965
2007-05-25 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkimage-quartz.c: (_gdk_quartz_image_copy_to_image):
Implement copying from a window, part of bug #348493.
svn path=/trunk/; revision=17917
2007-05-21 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdisplay-quartz.c: (gdk_display_open): Set the
resolution.
* gdk/quartz/gdkscreen-quartz.c: Use the autorelease pool macros.
svn path=/trunk/; revision=17887
007-05-05 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_drawable_get_context),
(gdk_quartz_drawable_release_context): Fix bugs #428733 and #433301.
Turns out the lockFocus logic was flawed, now we only lock/unlock
when called outside a real expose event and never flush manually.
svn path=/trunk/; revision=17798
2007-04-28 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gdk/quartz/gdkeventloop-quartz.c: (select_thread_func),
(poll_func): fix two more potential races that could happen when
an application is polling in the mainloop and a separate thread
tries to wake it up using g_idle_add(). Fixes#425271 comment 5.
svn path=/trunk/; revision=17680
2007-04-18 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_updates_internal),
(gdk_window_quartz_process_all_updates),
(gdk_window_impl_quartz_process_updates): Refactor the process
updates functions to share code between them. Also fixes bug
#427660 by not updating larger regions than necessary.
svn path=/trunk/; revision=17610
* gdk/quartz/gdkeventloop-quartz.c: Protect the polling thread
setup and shutdown function by mutexes and read the wakeup
pipe unconditionally and unblocking. This should make the main
loop always be woken up when using g_idle_add() from another
thread in the Quartz backend (#425271).
svn path=/trunk/; revision=17595
2007-04-06 Richard Hult <richard@imendio.com>
* gdk/quartz/: Clean up namespaces to make the code more
maintainable.
* gdk/quartz/gdkdrawable-quartz.c:
* gdk/quartz/gdkgc-quartz.c: Fix bug #418384, alignment of tiled
images, by setting the pattern phase for the CG pattern.
svn path=/trunk/; revision=17584
2007-03-15 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkmain-quartz.c: Add stubs for
gdk_notify_startup_complete_with_id and gdk_window_set_startup_id
here too.
svn path=/trunk/; revision=17521
2007-03-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_drawable_get_context): Update for the new quartz cairo
surface API (#410442). Don't lock focus unless called outside of an
expose event.
(gdk_quartz_drawable_release_context): Only flush the CG context and
unlock focus if called outside of expose.
(gdk_quartz_ref_cairo_surface): Reuse the surface during its lifetime.
(_gdk_quartz_drawable_finish): New function, used to free the cached
cairo surface.
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_impl_quartz_begin_paint_region): A few small style changes.
(gdk_window_quartz_process_all_updates): Move the autorelease pool
allocation and freeing outside the loop.
(_gdk_windowing_window_destroy): Finish the drawable.
(move_resize_window_internal): Small cleanup and remove comment.
(_gdk_window_impl_quartz_get_type): No need to make the type info
static.
* gdk/quartz/gdkpixmap-quartz.c: Finish the drawable.
svn path=/trunk/; revision=17463
2007-03-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkprivate-quartz.h: Add missing function signature to fix
a build warning.
svn path=/trunk/; revision=17462
2007-03-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (gdk_screen_get_setting): Don't set
the font name here, leave that to themes, fixes#387508.
svn path=/trunk/; revision=17459
2007-02-18 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_all_updates),
(_gdk_windowing_window_destroy): Setup release pools to plug two leaks,
patch from Erik van Pienbroek, fixes bug #396649.
svn path=/trunk/; revision=17325
2007-02-18 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.h:
* gdk/quartz/GdkQuartzWindow.h:
* gdk/quartz/gdkquartz.h: Import AppKit.h instead of Quartz.h.
* gdk/quartz/gdkscreen-quartz.c: (get_mm_from_pixels): Don't use
userSpaceScaleFactor for 10.3. Those changes bring us closer to working
on panther, patch from Mathias Hasselmann.
* gdk/quartz/gdkeventloop-quartz.c: Add includes to fix build warnings.
svn path=/trunk/; revision=17323
2006-12-28 Mikael Hallendal <micke@imendio.com>
* gdk/quartz/gdkevents-quartz.c: Factored out the event loop
integration into gdkeventloop-quartz.c.
* gdk/quartz/Makefile.am: Added gdkeventloop-quartz.c
* gdk/quartz/gdkeventloop-quartz.c: New file containing the event loop
integration.
2006-12-19 Mikael Hallendal <micke@imendio.com>
* gdk/quartz/gdkcursor-quartz.c: Splitted out the GdkPixbuf to NSImage
routine so that it can be used from libgtk as well (needed for
upcoming GtkStatusIcon support in the Quartz port).
* gdk/quartz/gdkevents-quartz.c: Don't assume that all NSWindows are
created from GDK, this is not true for the status icon.
* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkquartz.h: Added
gdk_quartz_pixbuf_to_ns_image_libgtk_only so that it is available to
the status icon code.
2006-09-21 Michael Natterer <mitch@imendio.com>
Implement lots of value setters for GdkGC, based on a heavily
modified patch from Thomas Broyer (bug #328853):
* gdk/quartz/gdkcolor-quartz.c: removed functions which set colors
on the CGContext. Instead, added gdk_quartz_get_rgba_from_pixel()
which simply returns RGBA values from a GdkColor's pixel value.
See gdk_quartz_update_context_from_gc() below.
* gdk/quartz/gdkprivate-quartz.h (struct GdkGCQuartz): added lots
of members for the newly suppored GC values. Added enum
GdkQuartzContextValuesMask which is used for setting up the
CGContext for filling and/or stroking.
* gdk/quartz/gdkgc-quartz.c (gdk_quartz_gc_get_values)
(gdk_quartz_gc_set_values)
(_gdk_windowing_gc_copy): support a lot more GC values.
(gdk_quartz_update_context_from_gc): added
GdkQuartzContextValuesMask parameter and set filling/stroking
parameters accordingly. This function also gained full control
over the FG and BG colors (they can't be set separately any more).
The stipple mask part of the patch doesn't work but seems to take
the right approach and doesn't make things worse, so I applied it.
Did *not* apply the clipping part of the patch since I don't
understand it (I don't understand the version in CVS either, but
it at least works :-)
* gdk/quartz/gdkdrawable-quartz.c: pass the right masks to
gdk_quartz_update_context_from_gc() and removed separate color
setting calls. Some minor fixes.
* gdk/quartz/gdkwindow-quartz.c
(gdk_window_impl_quartz_begin_paint_region): set the CGContext's
fill color manually. We don't have/need a GC here.
2006-09-21 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkwindow-quartz.c
(gdk_window_impl_quartz_begin_paint_region): fix cast: it's
drawable_impl->wrapper that is the GdkWindow, not the
drawable_impl itself.