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-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkkeys.h:
* gdk/x11/gdkkeys-x11.c (gdk_keymap_have_bidi_layouts): New
function to determine if keyboard layouts for both LTR and LTR
languages are in use. Refactor the direction caching code to
make this information available. (#451575, Behnam Esfahbod)
svn path=/trunk/; revision=18301
2007-06-29 Ryan Lortie <desrt@desrt.ca>
* tests/testgtk.c (create_composited_window): Connect the "destroy"
signal so that the 'window' pointer is set back to NULL (like for the
other examples).
* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize): Don't
destroy the Damage here. By finalize() XDestroyWindow has already
been called (and took the Damage with it).
Bug #452046.
svn path=/trunk/; revision=18290
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-25 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): Revert my
attempted overly simple fix for #445284, as it causes a
regression. (For instance, in GIMP the tool cursor gets used also
for the right-click menu in image windows.) A more complex fix is
needed to more completely emulate X11 behaviour.
svn path=/trunk/; revision=18225
Fri Jun 22 00:34:34 2007 Tim Janik <timj@gtk.org>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_xdisplay): applied
patch from Mark Tiefenbruck to add missing return_if_fail, #449862.
svn path=/trunk/; revision=18215
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-19 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* gdk/gdkinternals.h: Restore G_BEGIN_DECLS at the
top of this file to make C++ compilers happy.
svn path=/trunk/; revision=18196
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-17 Xan Lopez <xan@gnome.org>
* gdk/x11/gdkgeometry-x11.c: replace GDK_WINDOW calls by cast to
GdkWindow. Patch by Tilman Sauerbeck from #2063820.
svn path=/trunk/; revision=18170
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-15 Hans Breuer <hans@breuer.org>
* gtk/makefile.msc.in tests/makefile.msc : updated
* gdk/win32/gdkwindow-win32.c : explicit usage of RegisterClassExW
to match the WNDCLASSEXW.
True dynamic linking of SetLayeredWindowAttributes
* tests/testprint.c tests/testnouiprint.c : use G_PI
svn path=/trunk/; revision=18140
2007-06-14 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use
g_win32_get_windows_version() instead of _winver so that this
compiles on Cygwin, too. Not that I know if it makes sense to
build GTK+ with the Win32 backend for Cygwin, but some people want
to.
svn path=/trunk/; revision=18132
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-10 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab):
Don't revert the mouse cursor to the built-in one when
the user holds the mouse button down. (#445284, Tor Lillqvist)
svn path=/trunk/; revision=18093
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 Ross Burton <ross@openedhand.com>
* gdk/x11/gdkspawn-x11.c:
Set DISPLAY in the child process using g_setenv() instead of
constructing a new envp, which lets callers use child setup
functions which call putenv (#442617).
svn path=/trunk/; revision=18062
2007-06-06 Brian Cameron <brian.cameron@sun.com>
* gdk/Makefile.am: Add gdkmedialib.h to EXTRA_DIST so this header
file gets included with the distribution, as needed. Fixes bug
#442888. Reviewed by Matthias Clasen.
svn path=/trunk/; revision=18050
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-05 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Check that
window_private is not NULL before using it. (#444351, David Ronis)
svn path=/trunk/; revision=18043
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-30 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): Subtract the
multi-monitor offset from x and y before setting up the rectangle
for ClipCursor(). Fixes#442326.
svn path=/trunk/; revision=17988
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-26 Matthias Clasen <mclasen@redhat.com>
* gdk/directfb/gdkkeys-directfb.c: Remove duplicate doc comments
that cause problems when building the docs.
svn path=/trunk/; revision=17944
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
2007-05-16 Brian Cameron <brian.cameron@sun.com>
* acconfig.h, configure.in, gdk/Makefile.am, gdkprivate.h, gdkrgb.c,
gdkdraw.c, gdk-pixbuf/gdk-pixbuf-scale.c,
gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/pixops/pixops.[ch],
gdk-pixbuf/pixops/timescale.c: Add Sun mediaLib support so that
hardware acceleration via mediaLib is enabled if mediaLib is
detected via configure. Enhancement request #344813. I was given
permission to commit in the bug report by Matthias Clasen.
* gdk/medialib.[ch]: New files added for mediaLib support.
* docs/reference/gdk-pixbuf/tmpl/scaling.sgml,
docs/reference/gdk/tmpl/rgb.sgml, gdk/gdkdraw.c: Add docs for
mediaLib support.
svn path=/trunk/; revision=17855
2007-05-10 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkdraw.c (gdk_draw_pixbuf): Don't call into
the backend if the region is empty. (#437081, Sven Neumann)
svn path=/trunk/; revision=17813
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
* gdk/x11/gdkwindow-x11.c (setup_toplevel_window): Make sure the
leader_window's WM_CLIENT_LEADER points to itself. #435028
svn path=/trunk/; revision=17762
2007-04-30 Tor Lillqvist <tml@novell.com>
Add functionality to set overall opacity of a top-level
window. (#405316)
* gdk/gdk.symbols: Add gdk_window_set_opacity.
* gdk/x11/gdkwindow-x11.c
* gdk/win32/gdkwindow-win32.c: Implement
gdk_window_set_opacity(). On X11 use the _NET_WM_WINDOW_OPACITY
property. On Win32 use SetLayeredWindowAttributes(LWA_ALPHA).
* gdk/gdkwindow.h: Declare gdk_window_set_opacity().
* gdk/x11/gdkscreen-x11.c (gdk_screen_get_rgba_colormap): Document
that this is not implemented in the Windows backend. Add reference
to gdk_window_set_opacity().
svn path=/trunk/; revision=17730
* gdk/x11/gdkdisplay-x11.c
(gdk_x11_display_broadcast_startup_message): New method to
marshall and send a Startup Notification message. (from #415070)
(gdk_notify_startup_complete_with_id): Use that
svn path=/trunk/; revision=17710
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-10 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/xsettings-client.[hc]: Change the XSettingsWatchFunc
to return a Bool to indicate success. Update callers and
implementors. Based on a patch by Owen Taylor.
* gdk/x11/gdkevents-x11.c (gdk_xsettings_watch_cb): Don't
leak a reference to gdkwin.
svn path=/trunk/; revision=17592