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-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-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/gdkwindow-quartz.c: (move_resize_window_internal):
Fix the check for no changes to position and size.
svn path=/trunk/; revision=19147
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-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-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-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-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-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-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/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-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-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/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/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-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
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-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-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
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.