Commit Graph

2167 Commits

Author SHA1 Message Date
Michael Natterer
6c3637ea3e add utility function gdk_quartz_fix_cap_not_last_line() which fixes the
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 22:26:27 +00:00
Michael Natterer
dde0d5ffa5 add gdk_gc_quartz_init() and set some values to the defaults used by X11.
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 21:22:15 +00:00
Michael Natterer
88a05af64f use the same code for GDK_XOR as for GDK_INVERT. Xor with an arbitrary
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-07 18:25:15 +00:00
Matthias Clasen
498dac7ed2 Fix a doc formatting thing
svn path=/trunk/; revision=18071
2007-06-07 04:28:56 +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
Ross Burton
58d99db469 Set DISPLAY in the child process using g_setenv() instead of constructing
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 15:57:58 +00:00
Matthias Clasen
50fca8df5e Fix the build
svn path=/trunk/; revision=18055
2007-06-06 13:05:34 +00:00
Brian Cameron
b67d9a7dd0 Add gdkmedialib.h to EXTRA_DIST so this header file gets included with the
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 10:15:23 +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
949a86729d Don't let temp windows become key window.
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-06 08:21:14 +00:00
Tor Lillqvist
c62db99be2 Fix embarrassing crash. (#444457, Torsten Schoenfeld)
2007-06-06  Tor Lillqvist  <tml@novell.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_opacity): Fix
	embarrassing crash. (#444457, Torsten Schoenfeld)


svn path=/trunk/; revision=18045
2007-06-06 00:03:25 +00:00
Matthias Clasen
3047c1fcf2 Check that window_private is not NULL before using it. (#444351, David
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-05 15:53:41 +00:00
Richard Hult
3337ee8fa2 Don't try to make temp windows key windows, fixes problem introduced
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-04 21:25:42 +00:00
Richard Hult
72469142a0 * gdk/quartz/gdkwindow-quartz.c: Implement simple versions of
2007-06-04  Richard Hult  <richard@imendio.com>

	* gdk/quartz/GdkQuartzWindow.c: * gdk/quartz/gdkwindow-quartz.c:
	Implement simple versions of gdk_window_set_accept_focus and
	gdk_window_set_focus_on_map.

svn path=/trunk/; revision=18038
2007-06-04 20:45:30 +00:00
Richard Hult
60be3caaaa Implement.
2007-06-04  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c: (gdk_window_raise),
	(gdk_window_raise): Implement.

svn path=/trunk/; revision=18037
2007-06-04 20:08:31 +00:00
Richard Hult
05e560661f Implement gdk_window_set_transient_for.
2007-06-04  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c:
	* gdk/quartz/gdkwindow-quartz.h: Implement 
	gdk_window_set_transient_for.

svn path=/trunk/; revision=18036
2007-06-04 20:02:58 +00:00
Matthias Clasen
0f4d0f8e62 2.11.1
svn path=/trunk/; revision=18027
2007-06-04 17:01:14 +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
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Alp Toker
5ffdc33df0 Fix doc typos.
2007-06-01  Alp Toker  <alp.toker@collabora.co.uk>

	* gdk/gdkcairo.c (gdk_cairo_set_source_pixmap): Fix doc typos.


svn path=/trunk/; revision=17999
2007-06-01 05:10:50 +00:00
Richard Hult
71cf54aef3 Add this function, bug #438440.
2007-05-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkselection-quartz.c (gdk_free_text_list): Add this
	function, bug #438440.

svn path=/trunk/; revision=17991
2007-05-30 17:20:26 +00:00
Tor Lillqvist
d022f4c32d Subtract the multi-monitor offset from x and y before setting up the
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-30 15:44:28 +00:00
Simos Xenitellis
f2f53a6955 Closed #442183 – Updated gdk/gdkkeysyms-update.pl
svn path=/trunk/; revision=17984
2007-05-30 13:23:40 +00:00
Cody Russell
b5fe5d5bea Fix initialization of last cursor
svn path=/trunk/; revision=17973
2007-05-29 01:04:59 +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
6ecae9e5eb Refactored version of _gdk_quartz_window_find_child_by_point, that doesn't
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 20:42:51 +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
63228c672f Set a size for the root window.
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 20:22:26 +00:00
Richard Hult
0057d19453 Add comments about what various coordinates are relative to.
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-28 20:20:46 +00:00
Matthias Clasen
cf3783f8a1 Remove duplicate doc comments that cause problems when building the docs.
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-27 01:36:52 +00:00
Matthias Clasen
73456d9412 Update docs
svn path=/trunk/; revision=17942
2007-05-26 20:50:34 +00:00
Matthias Clasen
8f955adce7 Update docs
svn path=/trunk/; revision=17941
2007-05-26 20:49:08 +00:00
Matthias Clasen
b6d58ad642 Fix docs
svn path=/trunk/; revision=17939
2007-05-26 20:43:23 +00:00
Richard Hult
caab6d9737 Implement copying from a window, part of bug #348493.
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-25 19:47:23 +00:00
Matthias Clasen
6921206dd8 2.11.0
svn path=/trunk/; revision=17903
2007-05-24 05:51:56 +00:00
Matthias Clasen
451b0a7bfd Add some missing symbols.
2007-05-23   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gdk/x11/xsettings-common.h:
        * gdk/gdk.symbols: Add some missing symbols.

        * gtk/paper_names_offsets.c:
        * gtk/gen-paper-names.c: Make variables static.

        * gtk/gtktooltip.[hc]:
        * gtk/gtkvolumebutton.c:
        * gtk/gtkscalebutton.c:  Fix up symbol aliasing.

svn path=/trunk/; revision=17899
2007-05-23 17:49:34 +00:00
Richard Hult
e8071ea7c9 Set the resolution.
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-21 19:40:43 +00:00
Attilio Fiandrotti
ffbf29ea1f Updated minimum DirectFB version required to enable gdk_directfb_create_child_window()
svn path=/trunk/; revision=17879
2007-05-20 21:51:10 +00:00
Brian Cameron
94dcec33c1 Add Sun mediaLib support so that hardware acceleration via mediaLib is
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-16 01:35:51 +00:00
Cody Russell
50af49319a Fix context iterations for handle_configure_event()
svn path=/trunk/; revision=17834
2007-05-13 18:44:27 +00:00
Behdad Esfahbod
59325686f2 Fix wrong cairo path generation. (#437879, Eddie C. Dost)
2007-05-12  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkdraw.c (gdk_draw_trapezoids): Fix wrong cairo path 
        generation.  (#437879, Eddie C. Dost)


svn path=/trunk/; revision=17831
2007-05-12 18:52:36 +00:00
Matthias Clasen
8a1283ac0e Don't call into the backend if the region is empty. (#437081, Sven
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
2007-05-10 19:23:30 +00:00
Richard Hult
d9dedc36ec Fix bugs #428733 and #433301. Turns out the lockFocus logic was flawed,
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-05-05 10:19:39 +00:00
Dan Winship
17274cbe88 Make sure the leader_window's WM_CLIENT_LEADER points to itself. #435028
* 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-05-02 00:02:14 +00:00
Michael Emmel
6bade15e60 Added stub gdk_notify_startup_complete_with_id to compile Added
2007-05-01  Michael Emmel  <mike.emmel@gmail.com>

    * gdk/directfb/gdkdisplay-directfb.c:
    Added stub gdk_notify_startup_complete_with_id to compile
    * gdk/directfb/gdkwindow-directfb.c:
    Added gdk_window_set_opacity
    * gdk/directfb/gdkkeys-directfb.c:
    Fix menu key handling crash Bug #413328


svn path=/trunk/; revision=17752
2007-05-01 16:10:51 +00:00
Richard Hult
34c0f15bdf Implement.
2007-04-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_opacity):
	Implement.

svn path=/trunk/; revision=17743
2007-04-30 17:42:49 +00:00
Matthias Clasen
7c4d711777 Some more compiler warning fixes.
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        Some more compiler warning fixes.

        * gdk/directfb/gdkscreen-directfb.c (gdk_screen_is_composited):
        Fix NULL/FALSE confusion.


svn path=/trunk/; revision=17740
2007-04-30 16:22:31 +00:00
Cody Russell
c75e9c1df7 Clear correct area
svn path=/trunk/; revision=17737
2007-04-30 15:29:16 +00:00
Tor Lillqvist
b18f044270 Add functionality to set overall opacity of a top-level window. (#405316)
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
2007-04-30 07:27:22 +00:00
Dan Winship
0d2678417c New method to marshall and send a Startup Notification message. (from
* 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-29 18:13:42 +00:00
Ronald Bultje
92563b7d22 fix two more potential races that could happen when an application is
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-28 18:14:19 +00:00
Matthias Clasen
b72dfb8c4e Plug memory leaks caused by wrong use of g_slist_remove_link(). (#405515,
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gdk/win32/bdfcursor.c (compose_cursors_from_fonts):
        * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_reorder):
        * gtk/gtkfilesystemmodel.c (got_root_folder_cb):
        (get_children_folder_cb): Plug memory leaks caused by wrong
        use of g_slist_remove_link().  (#405515, Nicolas Peninguy)



svn path=/trunk/; revision=17671
2007-04-28 14:41:04 +00:00
Matthias Clasen
61de24aa9a Factor out window movement functions. (#63820, Tilman Sauerbeck)
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Factor out window movement
        functions. (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17665
2007-04-27 23:31:58 +00:00
Matthias Clasen
e47eff75da Factor out translate_pos(). (#63820, Tilman Sauerbeck)
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Factor out translate_pos().
        (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17664
2007-04-27 23:29:23 +00:00
Matthias Clasen
dad718f622 Factor out window mapping and unmapping functions. (#63820, Tilman
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Factor out window mapping
        and unmapping functions.  (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17663
2007-04-27 23:26:46 +00:00
Matthias Clasen
197f292161 Make list handling code easier to read. (#63820, Tilman Sauerbeck)
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Make list handling code
        easier to read.  (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17662
2007-04-27 23:23:52 +00:00
Cody Russell
2cf71073ed Use native Win32 cursors where it makes sense
svn path=/trunk/; revision=17645
2007-04-26 05:27:55 +00:00
Cody Russell
273c94e194 Win32 drop shadow goodness
svn path=/trunk/; revision=17643
2007-04-25 23:44:54 +00:00
Richard Hult
c8d89a96a2 Refactor the process updates functions to share code between them. Also
2007-04-18  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c:
	(gdk_window_quartz_process_updates_internal),
	(gdk_window_quartz_process_all_updates),
	(gdk_window_impl_quartz_process_updates): Refactor the process 
	updates functions to share code between them. Also fixes bug 
	#427660 by not updating larger regions than necessary.

svn path=/trunk/; revision=17610
2007-04-18 20:09:55 +00:00
Matthias Clasen
d558d49c14 Handle a borderline case correctly
svn path=/trunk/; revision=17608
2007-04-18 15:19:58 +00:00
Ronald Bultje
7c0f9e4d9d Protect the polling thread setup and shutdown function by mutexes and read
* 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-11 11:08:22 +00:00
Matthias Clasen
3b95bc271d Change the XSettingsWatchFunc to return a Bool to indicate success. Update
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
2007-04-10 23:16:30 +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
Loïc Minier
8b20a27e0a Revert to non-xinerama mode when XineramaQueryScreens returns NULL; patch
2007-04-03  Loïc Minier  <lool@dooz.org>

	* gdk/x11/gdkscreen-x11.c: (check_xfree_xinerama): Revert to
	non-xinerama mode when XineramaQueryScreens returns NULL; patch from
	Simon McVittie; #425786.

svn path=/trunk/; revision=17579
2007-04-03 13:48:26 +00:00
Elijah Newren
9384ea655c Patch from Matthias to add support for the _NET_WM_USER_TIME_WINDOW EWMH
2007-03-31  Elijah Newren  <newren gmail com>

	* gdk/x11/gdkwindow-x11.c (setup_toplevel_window,
	  gdk_x11_window_set_user_time):
	Patch from Matthias to add support for the
	_NET_WM_USER_TIME_WINDOW EWMH protocol; see #354213.

	WARNING: This patch will make metacity <= 2.18.0 freeze on
	workspace switch.  This is due to a weird problem that should only
	affect window managers using gdk in-process for decoration drawing
	and which make an unsafe assumption relating to doing so (i.e. it
	should only affect metacity).  Upgrade your version of metacity if
	you hit this bug.

svn path=/trunk/; revision=17574
2007-04-01 03:38:34 +00:00
Chris Wilson
95eea6558f Initialise nxvisuals to 0 in order to handle XGetVisualInfo() failures
2007-03-17  Chris Wilson  <chris@chris-wilson.co.uk>

	* gdk/x11/gdkvisual-x11.c (_gdk_visual_init):
		Initialise nxvisuals to 0 in order to handle
		XGetVisualInfo() failures gracefully. (#419171)


svn path=/trunk/; revision=17538
2007-03-17 18:51:35 +00:00
Richard Hult
47b6f2c2eb Add stubs for gdk_notify_startup_complete_with_id and
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-15 18:06:58 +00:00
Tor Lillqvist
03ad30de0a Add gdk_notify_startup_complete_with_id and gdk_window_set_startup_id.
2007-03-15  Tor Lillqvist  <tml@novell.com>

	* gdk/gdk.symbols: Add gdk_notify_startup_complete_with_id and
	gdk_window_set_startup_id.

	* gdk/win32/gdkmain-win32.c: Add dummy implementations of the above.


svn path=/trunk/; revision=17518
2007-03-15 16:48:26 +00:00
Michael Natterer
d953ce8775 Make gtk_widget_set_extension_events() work on already realized widgets
2007-03-14  Michael Natterer  <mitch@imendio.com>

	Make gtk_widget_set_extension_events() work on already realized
	widgets (bug #379550, Tommi Komulainen)

	* gdk/x11/gdkinput.c (gdk_input_set_extension_events): allow to be
	called multiple times without leaking and work correctly when
	already realized (don't rely on a configure event following).

	* gtk/gtkwidget.c (gtk_widget_set_extension_events_internal): new
	internal function which walks the GdkWindow tree and sets the
	extension events on all windows that belong to the widget.

	(gtk_widget_realize)
	(gtk_widget_set_extension_events): use the new function.


svn path=/trunk/; revision=17515
2007-03-14 13:55:12 +00:00
Emmanuele Bassi
87c28d778a Apply patch by Vytautas Liuolia for changing the startup notification id
2007-03-13  Emmanuele Bassi  <ebassi@gnome.org>

	Apply patch by Vytautas Liuolia for changing the startup
	notification id on a window in the X11 backend. (#347375)

	* gdk/gdk.h:
	* gdk/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id()
	and gdk_x11_display_get_startup_notification_id().

	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id().

	* gtk/gtkwindow.h:
	* gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to
	change the startup notification id.
	
	(gtk_window_class_init), (gtk_window_init),
	(gtk_window_set_property): Add write-only "startup-id" property
	to GtkWindow.

	(gtk_window_realize): Set the startup notification id
	on a GtkWindow if it's valid.

	(gtk_window_map): If we have another valid startup notification
	id then finish the notification process.

svn path=/trunk/; revision=17508
2007-03-13 17:03:54 +00:00
Matthias Clasen
abaed38888 Doc improvements
svn path=/trunk/; revision=17496
2007-03-12 06:26:34 +00:00
Richard Hult
d7a33adeda Update for the new quartz cairo surface API (#410442). Don't lock focus
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 21:58:49 +00:00
Richard Hult
9493e135c7 Add missing function signature to fix a build warning.
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 21:35:20 +00:00
Richard Hult
feabd0d76d Plug a leak.
2007-03-10  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkdisplay-quartz.c: (gdk_display_get_name): Plug a leak.

svn path=/trunk/; revision=17461
2007-03-10 21:04:05 +00:00
Richard Hult
5b14b85c3a Remove unneccesary exposure mask check.
2007-03-10  Richard Hult  <richard@imendio.com>

	* gdk/quartz/GdkQuartzView.c: Remove unneccesary exposure mask check.

svn path=/trunk/; revision=17460
2007-03-10 20:57:13 +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
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
3eb22a1ff8 Defer the callbacks to an idle to avoid deadlock with xcb-ified libX11.
2007-03-08  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkasync.c (send_event_handler): Defer the callbacks
        to an idle to avoid deadlock with xcb-ified libX11.  (#413032,
        Sebastian Dröge)



svn path=/trunk/; revision=17436
2007-03-09 05:28:00 +00:00
Tor Lillqvist
af11ec647f gdk/Makefile.am gdk-pixbuf/Makefile.am Further fixes for building on Win32
2007-03-06  Tor Lillqvist  <tml@novell.com>

	* gdk/Makefile.am
	* gdk-pixbuf/Makefile.am
	* gtk/Makefile.am: Further fixes for building on Win32 outside
	srcdir. (#413492, Mathias Hasselmann)


svn path=/trunk/; revision=17395
2007-03-06 09:52:35 +00:00
Tor Lillqvist
cf9ae54980 Add comment clarifying that "icon name" here is not related to the
2007-02-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon_name): Add
	comment clarifying that "icon name" here is not related to the
	freedesktop.org icon naming stuff.


svn path=/trunk/; revision=17351
2007-02-26 13:48:01 +00:00
Tor Lillqvist
fcbf646cce Remove. (gdk_device_get_type): Drop class init function. The X11 version
2007-02-19  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkinput.c
	(gdk_device_finalize, gdk_device_class_init): Remove.
	(gdk_device_get_type): Drop class init function. The X11 version
	doesn't have one either.
	(gdk_devices_list): Call gdk_display_list_devices() on _gdk_display.
	(gdk_display_list_devices): Check that the argument is
	_gdk_display.

	* gdk/win32/gdkinput-win32.h (GdkAxisInfo, GdkDevicePrivate):
	Cleanup: remove unused fields.
	* gdk/win32/gdkinput-win32.c: Corresponding changes. Fix function
	names in a few debugging printouts.


svn path=/trunk/; revision=17332
2007-02-19 00:32:32 +00:00
Richard Hult
e344a52104 Setup release pools to plug two leaks, patch from Erik van Pienbroek,
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 11:04:06 +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
Richard Hult
a862e9f6b9 Import AppKit.h instead of Quartz.h. Don't use userSpaceScaleFactor for
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
2007-02-18 10:26:49 +00:00
Behdad Esfahbod
af93363a76 Use PANGO_PIXELS instead of division. (#334617)
2007-02-16  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkpango.c (gdk_pango_layout_get_clip_region): Use PANGO_PIXELS
        instead of division. (#334617)


svn path=/trunk/; revision=17317
2007-02-16 22:12:42 +00:00
Matthias Clasen
e4b166722c Be more careful when checking for ButtonRelease events that end implicit
2007-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdmain-x11.c (_gdk_xgrab_check_button_event): Be more
        careful when checking for ButtonRelease events that end implicit
        grabs.  (#386618, Christof Krüger)



svn path=/trunk/; revision=17304
2007-02-16 04:01:50 +00:00
Cody Russell
ea7cc8d95e Fix Win32 resize events and flickering
svn path=/trunk/; revision=17299
2007-02-15 18:28:55 +00:00
Cody Russell
bd151b02f6 Add gdk_event_request_motions
2007-02-07  Cody Russell  <bratsche@gnome.org>

        * gdk/gdk.symbols: Add gdk_event_request_motions


svn path=/trunk/; revision=17275
2007-02-07 20:33:46 +00:00
Tim Janik
94e19baaae fixed typo
svn path=/trunk/; revision=17270
2007-02-06 15:02:59 +00:00
Tim Janik
caa4d15dab call gdk_event_request_motions() for new motion events after receiving
Tue Feb  6 15:53:59 2007  Tim Janik  <timj@imendio.com>

        * gtk/gtktextview.c (gtk_text_view_motion_event):
        * gtk/gtkspinbutton.c (gtk_spin_button_motion_notify):
        * gtk/gtkaboutdialog.c (credits_motion_notify_event):
        * gtk/gtkhruler.c (gtk_hruler_motion_notify):
        * gtk/gtkvruler.c (gtk_vruler_motion_notify): 
        * gtk/gtkentry.c (gtk_entry_motion_notify):
        * gtk/gtktooltip.c (_gtk_tooltip_handle_event):
        * gtk/gtkhsv.c (gtk_hsv_motion): call gdk_event_request_motions()                              
        for new motion events after receiving motion hints.

        * gdk/gdkevents.[hc]: added gdk_event_request_motions().



svn path=/trunk/; revision=17269
2007-02-06 14:53:35 +00:00
Tor Lillqvist
bc9c5d2a9f Nitpick. Define BITMAPV5HEADERS also for w32api < 3.0, although I have
no idea whether gdk/win32 would build with such an old beast.


svn path=/trunk/; revision=17258
2007-02-04 00:32:52 +00:00
Tor Lillqvist
e11c63d517 Don't define BITMAPV5HEADER on mingw with w32api >= 3.8, which has it in
2007-02-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: Don't define BITMAPV5HEADER on
	mingw with w32api >= 3.8, which has it in wingdi.h. (#403896)


svn path=/trunk/; revision=17256
2007-02-04 00:19:53 +00:00
Tor Lillqvist
3795a5cb61 New debugging function. (_gdk_input_wintab_init_check): Call it when
2007-01-31  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkinput-win32.c (print_cursor): New debugging
	function.
	(_gdk_input_wintab_init_check): Call it when debugging output is
	requested.
	(_gdk_input_wintab_init_check): Skip duplicated cursors for Wacom
	tablets. The Wacom driver reports duplicated cursors with
	physid==0. Fix verified by Robert *gren. (Should be U+00D6
	there, but svn won't let me.)


svn path=/trunk/; revision=17241
2007-01-30 23:49:39 +00:00