Commit Graph

51 Commits

Author SHA1 Message Date
Richard Hult
fd8c2c01a9 Fix a bug where we could end up trying to handle the same event more than
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-10 19:00:23 +00:00
Richard Hult
fd069852e0 Fix warning when switching spaces in leopard.
2007-12-06  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c:
	(synthesize_crossing_events_for_ns_event): Fix warning when
	switching spaces in leopard.

svn path=/trunk/; revision=19119
2007-12-06 12:39:01 +00:00
Richard Hult
eb52c4f1f8 Plug leak.
2007-07-14  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c:
	(_gdk_quartz_events_update_cursor): Plug leak.

svn path=/trunk/; revision=18468
2007-07-14 12:14:36 +00:00
Richard Hult
ed82448b9a Move from here... ...to here. (_gdk_windowing_window_destroy): Update the
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-13 19:09:10 +00:00
Richard Hult
a07742849e Keep track of button state and include it in key events. Needed for gimp's
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 20:31:59 +00:00
Richard Hult
eb3dcdf094 Include modifier state in key release events. Fixes bug #453413.
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-07-03 18:49:09 +00:00
Richard Hult
460833b2bc Continue the event handling cleanup:
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 21:50:06 +00:00
Richard Hult
ee283b058a Simplify (get the origin directly from the window).
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 19:55:20 +00:00
Richard Hult
a598c633b5 No need to special case the root window now that it has the right size.
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 19:50:31 +00:00
Richard Hult
95f61d98f3 Improve comments in those files. Add a debugging helper to print out
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 19:39:45 +00:00
Richard Hult
9d66399094 Don't steal menu events while the keyboard is grabbed.
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 19:54:04 +00:00
Richard Hult
decff53495 Forward Mac OS menu shortcut events to the right menu.
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 20:36:26 +00:00
Richard Hult
33ec37ee9e More refactoring of the event handling: Extract synthesizing of crossing
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-17 18:41:36 +00:00
Richard Hult
cd03a9e977 Remove pointless logging for unhandled events. Activate the application on
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-17 14:29:21 +00:00
Richard Hult
e206f6dd3a Ignore events and break any grabs while the window is being dragged.
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 21:39:42 +00:00
Richard Hult
2902d87a22 Move the checks for no window or a non-GDK window from here...
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 16:16:43 +00:00
Richard Hult
4fd1fb4d9b Break out into a separate function.
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 15:43:23 +00:00
Richard Hult
ec32b2aaa3 Rework how we get the event window: don't get the window from the NSEvent,
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 18:42:07 +00:00
Richard Hult
ed8d0fc691 Don't do anything if the two windows are the same.
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 16:23:50 +00:00
Richard Hult
726c23e20f Ignore if the old and new windows are the same.
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 09:06:59 +00:00
Richard Hult
fb6a0314fd Update comment to be more clear and print a warning if we try to create a
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-06 08:29:20 +00:00
Richard Hult
9daa2554b5 Set the key modifier state.
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 18:51:16 +00:00
Richard Hult
975e7683b8 Make pointer grab emulation work a bit better:
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-03 18:48:47 +00:00
Richard Hult
1c413a691c Fix the coordinates in crossing events so they are relative to the right
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 21:46:45 +00:00
Richard Hult
be540c29ac Make function naming consistent for the various functions that retrieve
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-06-01 21:03:34 +00:00
Richard Hult
f2f1be4e4f Break out code that was repeated into separate functions and call them
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 21:11:55 +00:00
Richard Hult
d36c24a8b9 Fix typo, we need both press and release in the mask to trigger implicit
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 20:55:26 +00:00
Richard Hult
93948cdb4a Reset all the grab state, to help debugging. (gdk_event_translate): Use
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 20:51:11 +00:00
Richard Hult
52709dff9a Don't traverse beyond the toplevel of the passed in window.
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 20:24:59 +00:00
Richard Hult
9e2114e629 Clean up namespaces to make the code more maintainable.
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-04-06 21:12:48 +00:00
Richard Hult
5c477d1f12 Don't set the font name here, leave that to themes, fixes #387508.
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-03-10 20:50:58 +00:00
Richard Hult
fe5f64ecbc Add stub for gdk_display_add_client_message_filter, patch from Taybin
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
2007-02-18 10:56:13 +00:00
Mikael Hallendal
693c3c2649 Factored out the event loop integration into gdkeventloop-quartz.c.
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-28 09:04:48 +00:00
Mikael Hallendal
7c92045621 Splitted out the GdkPixbuf to NSImage routine so that it can be used from
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-12-19 15:53:44 +00:00
Richard Hult
382ef872b4 Add GDK button mask for NS dragging events. (create_scroll_event): Remove
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.
2006-08-15 20:13:13 +00:00
Richard Hult
230fcecae8 Whitespace cleanup. (synthesize_crossing_events): Add comments and prevent
2006-08-08  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup.
	(synthesize_crossing_events): Add comments and prevent a crash.
2006-08-08 21:06:03 +00:00
Richard Hult
571c460503 Always set success to TRUE. (gdk_color_change): Implement.
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.
2006-07-29 11:05:15 +00:00
Richard Hult
348bffc856 Implement getting the double click threshold.
2006-07-24  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Implement
	getting the double click threshold.
2006-07-24 12:31:17 +00:00
Richard Hult
7a3c18ab7b Set the window level depending on the type hint.
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).
2006-07-24 10:46:21 +00:00
Richard Hult
cb5f9e62e9 Append the event to the queue instead of using gdk_event_put.
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.
2006-07-20 08:06:54 +00:00
Richard Hult
d3973cb865 ]): Listen to windowDidResignMain notifications and properly update the
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.
2006-07-19 17:06:40 +00:00
Richard Hult
d473868ace Fill in string, length and is_modifier for key events. Map some more keys
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.
2006-07-17 18:39:43 +00:00
Richard Hult
2d41ff51f5 Fix comment. (gdk_window_set_title): Surround by release pool macros.
2006-07-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c:
	(_gdk_windowing_window_destroy_foreign): Fix comment.
	(gdk_window_set_title): Surround by release pool macros.
	(gdk_window_get_type_hint): Fix return value.
	(gdk_window_get_frame_extents): Implement.
	(gdk_window_iconify): Use the release pool macros.
	(gdk_window_deiconify): Likewise.
	(_gdk_windowing_get_pointer): Implement.
	(gdk_window_get_deskrelative_origin, gdk_window_get_root_origin):
	Implement.

	* gdk/quartz/gdkevents-quartz.c (create_crossing_event)
	(create_scroll_event, convert_window_coordinates_to_root):
	Set coordinates and root coordinates for crossing and scroll
	events.

	* gdk/quartz/gdkcursor-quartz.c (gdk_cursor_new_for_display):
	Map some more cursors.
2006-07-17 08:07:55 +00:00
Richard Hult
2fbe2ebc9a Generate a grab broken event when appropriate. Fixes bug #346603, patch
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.
2006-07-07 20:19:22 +00:00
Richard Hult
4080181c45 Remove obsolete comment. (poll_func): Remove assert and add a comment on
2006-05-15  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (_gdk_events_init): Remove obsolete
	comment.
	(poll_func): Remove assert and add a comment on how to fix properly.
	(gdk_events_pending): Implement.
2006-05-15 19:01:57 +00:00
Anders Carlsson
a62b7cdc9a Take grabs into account.
2006-04-13  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (synthesize_enter_event):
        (synthesize_leave_event):
        (synthesize_crossing_events):
        Take grabs into account.

        (find_window_for_event):
        Only return grabbed window when owner_events is FALSE.
2006-04-13 08:51:33 +00:00
Anders Carlsson
856ee02fe4 Make the poll func work with real file descriptors. We do this by creating
2006-03-27  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (select_thread_func):
        (got_fd_activity):
        (poll_func):
        (gdk_event_translate):
        Make the poll func work with real file descriptors.
        We do this by creating a thread which calls poll and then
        signals the main thread using a run loop source.

        * gtk/gtkclipboard-quartz.c:
        (-[GtkClipboardOwner pasteboard:provideDataForType:]):
        Remove debugging output
2006-03-27 18:46:38 +00:00
Anders Carlsson
cae6c15d65 Fix typo so ctrl gets passed on to the gdk event.
2006-02-20  Anders Carlsson  <andersca@mac.com>

        * gdk/quartz/gdkevents-quartz.c:
        (get_keyboard_modifiers_from_nsevent):
        Fix typo so ctrl gets passed on to the gdk event.

        * gdk/quartz/gdkproperty-quartz.c:
        (gdk_atom_name):
        g_strdup the atom name.
2006-02-20 11:07:25 +00:00
Anders Carlsson
4afc4d61c6 Implement keyboard grabs.
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
2006-01-16 10:52:40 +00:00
Anders Carlsson
6130996a77 Have these return TRUE
2006-01-02  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/GdkQuartzWindow.c:
        (-[GdkQuartzWindow canBecomeMainWindow]):
        (-[GdkQuartzWindow canBecomeKeyWindow]):
        Have these return TRUE

        * gdk/quartz/gdkevents-quartz.c:
        (pointer_grab_internal):
        Remove FIXME

        (find_child_window_by_point_helper):
        Fix bug in offset calculation

        (find_window_for_event):
        Use grab window toplevel when a grab is in effect

        (gdk_event_translate):
        Don't call _gdk_event_button_generate on mouse up

        * gdk/quartz/gdkgc-quartz.c:
        (_gdk_quartz_gc_new):
        Fix indentation

        * gdk/quartz/gdkwindow-quartz.c:
        (gdk_window_new):
        Make TEMP windows borderless

        (gdk_window_hide):
        Hide window

        (gdk_window_get_origin):
        Implement
2006-01-02 16:34:21 +00:00