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.
2006-09-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkkeys-quartz.c: (maybe_update_keymap): Special-case
shift-tab and map it to GDK_ISO_Left_Tab, fixes bug #350806.
2006-09-03 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c (drawRect): Don't do anything if
exposure isn't in the event mask, plug a leak, and check that the
window isn't destroyed.
(isOpaque): Check that the window isn't destroyed, fixes bug
#353028.
2006-08-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkwindow.h:
* gdk/gdk.symbols:
* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
to beep on a window. For X11, implement this with
XkbBell. (#353455, Mariano Suárez-Alvarez)
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-10 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkwindow-quartz.c
(gdk_window_maximize)
(gdk_window_unmaximize)
(gdk_window_iconify)
(gdk_window_deiconify): don't try to set the state of unmapped
windows, call gdk_synthesize_window_state() instead. Also added
autorelease pools back, seems they are needed after all.
* gdk/quartz/gdkwindow-quartz.c (show_window_internal): maximize
and iconify windows here if the state says so.
2006-08-08 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Just expose the minimal region
instead of the whole rect.
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_all_updates), (gdk_window_update_idle),
(gdk_window_impl_quartz_invalidate_maybe_recurse),
(gdk_window_impl_quartz_process_updates),
(_gdk_windowing_window_destroy): Rework the expose handling so that
it works like the X11 backend, using an idle with the right
priority instead of relying on quartz to do it.
(gdk_window_set_type_hint): Use tornoff instead of submenu as the
documentation (and Mitch) suggests.
2006-08-08 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c: some whitespace and indentation
cleanup.
(gdk_quartz_draw_rectangle)
(gdk_quartz_draw_arc)
(gdk_quartz_draw_polygon)
(gdk_quartz_draw_points): for pixel-prefect drawing, stroked
coordinates need to go through pixel centers, while filled ones
need to go along pixel boundaries. Moved +0.5 adjusting to the
if(!filled) branches and added/removed some adjustments where they
were wrong.
2006-08-07 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c (gdk_quartz_draw_points): Don't
get and release the context for each point, just once, speeds up
drawing many points a lot.
2006-07-31 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c: (gdk_quartz_draw_drawable):
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_impl_quartz_begin_paint_region): Patch from Erik van
Pienbroek to implement drawing bg_pixmaps (#348145).
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-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-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-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 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_impl_quartz_init)
(gdk_window_set_type_hint, gdk_window_get_type_hint):
* gdk/quartz/GdkQuartzWindow.c
([GdkQuartzWindow -canBecomeMainWindow])
([GdkQuartzWindow -canBecomeKeyWindow]): Implement type hints and
use them to determine which windows should be allowed to become
main and key windows.
2006-07-19 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(_gdk_windowing_window_get_pointer): Get the position correctly
for the root window. Fixes bug #347976, patch by Dave Vasilevsky.
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 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-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkpixmap-quartz.c: (gdk_bitmap_create_from_data):
Account for alignment when reading xbm data. (#346721, patch
by Dave Vasilevsky)
2006-07-09 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_new): Release the pool
in all cases.
(move_resize_window_internal): Surround by alloc/release pool.
Patch from Brian Tarricone, fixes bug #347018.
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-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.
Tue Apr 25 10:25:28 2006 Søren Sandmann <sandmann@redhat.com>
* tests/testgtk.c (create_alpha_window): Create 'composited' label.
* tests/testgtk.c (on_composited_changed): New function, change
the label to say whether the screen is composited or not.
* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
composited status change, invalidate the window and propagate the signal;.
* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
if reset_type_hint is TRUE.
* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
the old hints, store a shadow copy in the public window->type_hint
bitfield, otherwise set this field to normal. Set the private
field to the type hint.
* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.
* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
"reset_type_hint" indicating whether the type hint needs to be
reset. New field type_hint containing a GdkWindowTypeHint.
* gtk/gtkwidget.c (propagate_composited_changed): New function to
propagate changes in composited status.
(gtk_widget_class_init): Add composited_changed signal.
* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.
* gtk/gtkwidget.c (gtk_widget_is_composited): New function.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.
* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
the item belongs to a menubar. Set the type_hint appropriately
depending on the outcome.
* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
changed on the attach widget.
* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
set the transient_for property for menus.
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.
* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
transient for the toplevel.
* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
transient-for, for the popup window.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
new window types.
* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
for new window types.
* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
New function called whenever the compositing manager comes and goes.
* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.
* gdk/x11/gdkscreen-x11.c
(_gdk_x11_screen_request_cm_notification, make_cm_atom,
check_is_composited): New functions
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
_gdk_x11_screen_process_owner_change when an
XFixesSelectionNotifyEvent is received.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
_gdk_x11_screen_request_cm_notification() on all screens.
* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
implementation.
* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
'composited-changed'.
* gdk/gdkwindow.h: Add new EWMH window types.
* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c: (gdk_quartz_draw_drawable): Add check
for source being a window.
* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_get_pointer):
Don't assert on window not being the root window.
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-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-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
2006-03-21 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_ref_cairo_surface):
(gdk_quartz_draw_rectangle):
(gdk_quartz_draw_arc):
(gdk_quartz_draw_polygon):
(gdk_quartz_draw_drawable):
(gdk_quartz_draw_segments):
(gdk_quartz_draw_lines):
(gdk_quartz_draw_pixbuf):
(gdk_quartz_draw_image):
(_gdk_quartz_drawable_get_context):
* gdk/quartz/gdkdrawable-quartz.h:
Offset coordinates by 0.5 pixels to get consistant results for both
image contexts and screen contexts.
2006-03-21 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/GdkQuartzWindow.c
([GdkQuartzWindow -windowDidMove:]): Synthesize GDK_CONFIGURE events
when the window position changes.
2006-02-21 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkselection-quartz.c:
(make_list):
(gdk_text_property_to_utf8_list_for_display):
Add these from the win32 backend.
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-01-28 Behdad Esfahbod <behdad@gnome.org>
* configure.in: If major.minor of required and available glib versions
are the same, add -DG_DISABLE_DEPRECATED to GLIB_CFLAGS. (bug #328617)
* */Makefile.am: Remove hardcoded -DG_DISABLE_DEPRECATED.
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(get_mm_from_pixels):
(gdk_screen_get_width_mm):
(gdk_screen_get_height_mm):
Implement these functions.
(#327228, Thomas Broyer).
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_draw_polygon):
(gdk_quartz_draw_lines):
Implement these functions.
(#327226, Thomas Broyer)
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkkeys-quartz.c:
(maybe_update_keymap):
Support non-MacRoman keyboard layouts.
(#322585, Wolfgang Thaller)
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkmain-quartz.c:
(_gdk_windowing_init):
Make the process a foreground application.
(#322481, Wolfgang Thaller)
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