1. 07 Jul, 2007 1 commit
    • Richard Hult's avatar
      ]) ([GdkQuartzWindow -windowDidBecomeMain:]): Keep a stack of main windows · 8b9cbdb2
      Richard Hult authored
      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
      8b9cbdb2
  2. 06 Jul, 2007 1 commit
  3. 01 Jun, 2007 1 commit
    • Richard Hult's avatar
      Make function naming consistent for the various functions that retrieve · be540c29
      Richard Hult authored
      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
      be540c29
  4. 28 May, 2007 1 commit
    • Richard Hult's avatar
      Refactored version of _gdk_quartz_window_find_child_by_point, that doesn't · 6ecae9e5
      Richard Hult authored
      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
      6ecae9e5
  5. 06 Apr, 2007 1 commit
    • Richard Hult's avatar
      Clean up namespaces to make the code more maintainable. · 9e2114e6
      Richard Hult authored
      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
      9e2114e6
  6. 10 Mar, 2007 2 commits
    • Richard Hult's avatar
      Update for the new quartz cairo surface API (#410442). Don't lock focus · d7a33ade
      Richard Hult authored
      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
      d7a33ade
    • Richard Hult's avatar
      Add missing function signature to fix a build warning. · 9493e135
      Richard Hult authored
      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
      9493e135
  7. 18 Feb, 2007 1 commit
    • Richard Hult's avatar
      Add stub for gdk_display_add_client_message_filter, patch from Taybin · fe5f64ec
      Richard Hult authored
      2007-02-18  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkevents-quartz.c: Add stub for 
      	gdk_display_add_client_message_filter, patch from Taybin Rutkin. Fixes
      	bug #405870.
      
      	* gdk/quartz/gdkprivate-quartz.h: Add prototypes to fix build warnings.
      
      svn path=/trunk/; revision=17324
      fe5f64ec
  8. 19 Dec, 2006 1 commit
    • Mikael Hallendal's avatar
      Splitted out the GdkPixbuf to NSImage routine so that it can be used from · 7c920456
      Mikael Hallendal authored
      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.
      7c920456
  9. 21 Sep, 2006 1 commit
    • Michael Natterer's avatar
      Implement lots of value setters for GdkGC, based on a heavily modified · 2f50232a
      Michael Natterer authored
      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.
      2f50232a
  10. 15 Aug, 2006 1 commit
    • Richard Hult's avatar
      Add GDK button mask for NS dragging events. (create_scroll_event): Remove · 382ef872
      Richard Hult authored
      2006-08-15  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkevents-quartz.c: (get_event_mask_from_ns_event):
      	Add GDK button mask for NS dragging events.
      	(create_scroll_event): Remove obsolete comment.
      	(_gdk_quartz_get_current_event_mask), (gdk_event_translate): Keep
      	track of the latest event mask here...
      
      	* gdk/quartz/gdkwindow-quartz.c:
      	(_gdk_windowing_window_get_pointer): And use it here. Patch from
      	Kristian Rietveld.
      	(gdk_window_quartz_update_idle): Rename to make things clearer.
      382ef872
  11. 29 Jul, 2006 1 commit
    • Richard Hult's avatar
      Always set success to TRUE. (gdk_color_change): Implement. · 571c4605
      Richard Hult authored
      2006-07-29  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkcolor-quartz.c (gdk_colormap_alloc_colors): Always
      	set success to TRUE.
      	(gdk_color_change): Implement.
      
      	* gdk/quartz/GdkQuartzWindow.c
      	([GdkQuartzWindow -canBecomeKeyWindow]): Add comment.
      
      	* gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Make the
      	default font a bit smaller until we have made this get the system
      	setting.
      
      	* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Enable
      	shadows for the right window types.
      
      	* gdk/quartz/gdkprivate-quartz.h:
      	* gdk/quartz/gdkgc-quartz.c:
      	* gdk/quartz/gdkdrawable-quartz.c:
      	* gdk/quartz/gdkcolor-quartz.c: Expose the CGContext functions,
      	update callers.
      
      	* gdk/quartz/gdkmain-quartz.c: (_gdk_windowing_init): No need to
      	get the current process ID, use the right constant instead.
      571c4605
  12. 24 Jul, 2006 1 commit
    • Richard Hult's avatar
      Set the window level depending on the type hint. · 7a3c18ab
      Richard Hult authored
      2006-07-24  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Set the
      	window level depending on the type hint.
      
      	* gdk/quartz/gdkevents-quartz.c (gdk_keyboard_grab,
      	pointer_ungrab_internal): Only break the grab if the new window is
      	a different one.
      	(gdk_event_translate): Catch the case where the entire app loses
      	focus and break any grabs. Only do implicit grabs when the event
      	mask has both press and release.
      
      	* gdk/quartz/gdkkeys-quartz.c (translate_keysym):
      	* gdk/quartz/gdkselection-quartz.c:
      
              * gdk/quartz/GdkQuartzWindow.c
      	([GdkQuartzWindow -windowDidResignKey:]): Use this to update the
      	focus window instead of resignMain, fixes the case where other apps
      	uses focus follows mouse (like the terminal can).
      7a3c18ab
  13. 20 Jul, 2006 1 commit
    • Richard Hult's avatar
      Append the event to the queue instead of using gdk_event_put. · cb5f9e62
      Richard Hult authored
      2006-07-20  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkevents-quartz.c: (generate_grab_broken_event):
      	Append the event to the queue instead of using gdk_event_put.
      	(_gdk_quartz_get_mouse_window, find_current_keyboard_window):
      	Handle grabs.
      	(get_event_mask_from_ns_event, create_focus_event)
      	(convert_window_coordinates_to_root, find_window_for_event)
      	(gdk_event_translate): Improve readability (style changes).
      	(gdk_flush, gdk_display_sync, gdk_display_flush)
      	(gdk_event_send_client_message_for_display),
      	(gdk_screen_broadcast_client_message): Remove FIXMEs.
      	(gdk_screen_get_setting): Reindent.
      	Also move find_child_window_by_point to gdkwindow-quartz.c.
      
      	* gdk/quartz/gdkwindow-quartz.c:
      	(find_child_window_by_point_helper),
      	(_gdk_quartz_find_child_window_by_point): Move here from
      	gdkevents-quartz.c
      	(_gdk_windowing_window_get_pointer): Handle destroyed windows and
      	imlement the return value.
      	(_gdk_windowing_window_at_pointer): Implement.
      cb5f9e62
  14. 19 Jul, 2006 1 commit
    • Richard Hult's avatar
      ]): Listen to windowDidResignMain notifications and properly update the · d3973cb8
      Richard Hult authored
      2006-07-19  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/GdkQuartzWindow.c
      	([GdkQuartzWindow -windowDidResignMain:]):
      	* gdk/quartz/gdkevents-quartz.c (_gdk_quartz_update_focus_window):
      	Listen to windowDidResignMain notifications and properly update the
      	focus window when windows are unfocused.
      d3973cb8
  15. 17 Jul, 2006 1 commit
    • Richard Hult's avatar
      Fill in string, length and is_modifier for key events. Map some more keys · d473868a
      Richard Hult authored
      2006-07-17  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkevents-quartz.c: (create_key_event):
      	* gdk/quartz/gdkkeys-quartz.c: (_gdk_quartz_key_event_type),
      	(_gdk_quartz_key_is_modifier):
      	* gdk/quartz/gdkprivate-quartz.h: Fill in string, length and
      	is_modifier for key events. Map some more keys into gdk keyvals.
      d473868a
  16. 07 Jul, 2006 1 commit
    • Richard Hult's avatar
      Generate a grab broken event when appropriate. Fixes bug #346603, patch · 2fbe2ebc
      Richard Hult authored
      2006-07-07  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkevents-quartz.c: Generate a grab broken event when
      	appropriate. Fixes bug #346603, patch from Dave Vasilevsky.
      
      	* gdk/quartz/gdkevents-quartz.c:
      	* gdk/quartz/gdkkeys-quartz.c:
      	* gdk/quartz/gdkprivate-quartz.c: Another patch from Dave Vasilevsky,
      	fixes bug #346605. Makes modifier key events being sent properly.
      2fbe2ebc
  17. 21 Mar, 2006 1 commit
    • Anders Carlsson's avatar
      Add the GDK part of the DND implementation. · 6b1510bf
      Anders Carlsson authored
      2006-03-21  Anders Carlsson  <andersca@imendio.com>
      
              * gdk/quartz/GdkQuartzWindow.c:
              (drag_operation_to_drag_action):
              (drag_action_to_drag_operation):
              (update_context_from_dragging_info):
              (-[GdkQuartzWindow draggingEntered:]):
              (-[GdkQuartzWindow draggingEnded:]):
              (-[GdkQuartzWindow draggingExited:]):
              (-[GdkQuartzWindow draggingUpdated:]):
              (-[GdkQuartzWindow performDragOperation:]):
              (-[GdkQuartzWindow wantsPeriodicDraggingUpdates]):
              (-[GdkQuartzWindow draggedImage:endedAt:operation:]):
              * gdk/quartz/gdkdnd-quartz.c:
              (gdk_drag_context_finalize):
              (gdk_drag_context_init):
              (gdk_drag_context_class_init):
              (gdk_drag_begin):
              (gdk_drag_status):
              Add the GDK part of the DND implementation.
      
              * gdk/quartz/Makefile.am:
              Add some missing headers.
      
              * gdk/quartz/gdkdrawable-quartz.h:
              * gdk/quartz/gdkprivate-quartz.h:
              * gdk/quartz/gdkquartz.h:
              * gdk/quartz/gdkwindow-quartz.c:
              (gdk_quartz_window_get_nsview):
              New function, for use by the GTK part of the DND implementation
      6b1510bf
  18. 16 Jan, 2006 1 commit
    • Anders Carlsson's avatar
      Implement keyboard grabs. · 4afc4d61
      Anders Carlsson authored
      2006-01-16  Anders Carlsson  <andersca@mac.com>
      
              * gdk/quartz/gdkdisplay-quartz.c:
              * gdk/quartz/gdkevents-quartz.c:
              (gdk_keyboard_grab):
              (gdk_display_keyboard_ungrab):
              (gdk_keyboard_grab_info_libgtk_only):
              (find_window_for_event):
              Implement keyboard grabs.
      
              (_gdk_quartz_send_map_events):
              * gdk/quartz/gdkmain-quartz.c:
              * gdk/quartz/gdkprivate-quartz.h:
              New function that synthesizes map events.
      
              * gdk/quartz/gdkwindow-quartz.c:
              (_gdk_windowing_window_init):
              The root window is always visible.
      
              (all_parents_shown):
              (show_window_internal):
              Send map events.
      
              (gdk_window_hide):
              Ungrab keyboard and pointer
      4afc4d61
  19. 22 Nov, 2005 1 commit
    • Anders Carlsson's avatar
      Add quartz backend. · 1097260a
      Anders Carlsson authored
      2005-11-21  Anders Carlsson  <andersca@imendio.com>
      
              * configure.in:
              * gtk/Makefile.am:
              * gdk/Makefile.am:
      	* gdk/quartz/*:
      	Add quartz backend.
      
              * docs/tools/Makefile.am:
      	Only build docshooter when the X11 backend is used.
      
              * gtk/gtkplug-stub.c:
      	Include gtkplug.h here.
      
              * gtk/gtksocket-stub.c:
      	Include gtksocket.h here.
      1097260a