Commit Graph

2167 Commits

Author SHA1 Message Date
Ryan Lortie
f0cfba930c add note that the semantics of this call, when mixed with the new
2007-07-20  Ryan Lortie  <desrt@desrt.ca>

        * gtk/gtkwidget.c (gtk_widget_is_composited): add note that the
        semantics of this call, when mixed with the new
        gdk_window_set_composited(), will change in the future.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): only grab Damage
        events that belong to us.


svn path=/trunk/; revision=18506
2007-07-19 23:50:39 +00:00
Richard Hult
032b0aab6b Ref the cursor in the cached case.
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-18 09:52:25 +00:00
Richard Hult
eb52c4f1f8 Plug leak.
2007-07-14  Richard Hult  <richard@imendio.com>

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

svn path=/trunk/; revision=18468
2007-07-14 12:14:36 +00:00
Richard Hult
ed82448b9a Move from here... ...to here. (_gdk_windowing_window_destroy): Update the
2007-07-13  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkprivate-quartz.h:
	* gdk/quartz/gdkevents-quartz.c: (gdk_window_is_ancestor): Move
	from here...
	* gdk/quartz/gdkwindow-quartz.c: (_gdk_quartz_window_is_ancestor):
	...to here.
	(_gdk_windowing_window_destroy): Update the mouse window if the
	destroyed window is an ancestor of the current one, not only if
	they are the same.
	(gdk_window_hide): Update the mouse window here too.

svn path=/trunk/; revision=18467
2007-07-13 19:09:10 +00:00
Richard Hult
7f66d205e8 Add stubs.
2007-07-13  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkcolor-quartz.c: (gdk_colors_alloc),
	(gdk_colors_free): Add stubs.

svn path=/trunk/; revision=18466
2007-07-13 19:02:07 +00:00
Cody Russell
e992008541 gdk/win32/gdkevents-win32.c Fix transient windows on Win32 so that when a
2007-07-12  Cody Russell  <bratsche@gnome.org>

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkwindow-win32.[ch]: Fix transient windows on Win32 
	so that when a transient child window is closed (particularly when 
	there are 3 or more levels of transient windows), the correct window
	receives focus rather than a seemingly random window. (#112404) 


svn path=/trunk/; revision=18461
2007-07-12 23:38:30 +00:00
Attilio Fiandrotti
34dfd591da Fixed memory leak at window closing in DirectFB backend, patch provided by Simon Lanzmich
svn path=/trunk/; revision=18459
2007-07-12 17:09:02 +00:00
Tim Janik
508baa258c clarified documentation example.
Thu Jul 12 18:03:02 2007  Tim Janik  <timj@gtk.org>

        * gdk/gdk.c (gdk_threads_add_idle_full): clarified documentation example.



svn path=/trunk/; revision=18458
2007-07-12 16:13:36 +00:00
Richard Hult
2048ec5925 Add hack to workaround the broken tracking rect implementation in quartz,
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-10 19:18:59 +00:00
Tim Janik
2af3c53e47 docu fixup by Bjoern Lindqvist, #454703.
Sun Jul  8 01:33:45 2007  Tim Janik  <timj@gtk.org>

        * gdk/gdkwindow.c: docu fixup by Bjoern Lindqvist, #454703.



svn path=/trunk/; revision=18398
2007-07-07 23:36:33 +00:00
Richard Hult
8b9cbdb2b6 ]) ([GdkQuartzWindow -windowDidBecomeMain:]): Keep a stack of main windows
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-07 16:19:40 +00:00
Richard Hult
5a4ed10fae Fix (de)miniaturizing transient windows, by (un)setting the parent before
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-06 19:49:42 +00:00
Richard Hult
9ba84faa5a Add stub.
2007-07-06  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkkeys-quartz.c (gdk_keymap_have_bidi_layouts): Add
	stub.

svn path=/trunk/; revision=18387
2007-07-06 18:46:39 +00:00
Tim Janik
52c134e007 added usage example to gdk_event_request_motions() docs.
Wed Jul  4 12:20:23 2007  Tim Janik  <timj@imendio.com>

        * gdk/gdkevents.c (gdk_event_request_motions): added usage example
        to gdk_event_request_motions() docs.



svn path=/trunk/; revision=18378
2007-07-04 10:21:05 +00:00
Richard Hult
a07742849e Keep track of button state and include it in key events. Needed for gimp's
2007-07-03  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: Keep track of button state and
	include it in key events. Needed for gimp's selection tools and
	fixes bug #453411.

svn path=/trunk/; revision=18369
2007-07-03 20:31:59 +00:00
Richard Hult
eb3dcdf094 Include modifier state in key release events. Fixes bug #453413.
2007-07-03  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (create_key_event): Include
	modifier state in key release events. Fixes bug #453413.

svn path=/trunk/; revision=18367
2007-07-03 18:49:09 +00:00
Tor Lillqvist
92421f96f6 Implement. Just return FALSE for now. What should this function actually
2007-07-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (gdk_keymap_have_bidi_layouts):
	Implement. Just return FALSE for now. What should this function
	actually do? Does keyboards layouts being "in use" mean that such
	layouts can be switched to on the fly? If so we need to actually
	check that.


svn path=/trunk/; revision=18359
2007-07-03 16:53:17 +00:00
Richard Hult
460833b2bc Continue the event handling cleanup:
2007-06-30  Richard Hult  <richard@imendio.com>

	Continue the event handling cleanup:

	* gdk/quartz/gdkevents-quartz.c: (synthesize_crossing_events):
	Don't do anything if the old and new windows are the same,
	simplifies the callers.
	(find_mouse_window_for_ns_event): Always return a window (root
	instead of NULL). Remove unneccessary check for the current mouse
	window being NULL, that was a workaround for a now fixed
	bug. Convert to root coordinates if we don't find a window.
	(synthesize_crossing_events_for_ns_event): Simplify and add
	comment.

svn path=/trunk/; revision=18316
2007-06-30 21:50:06 +00:00
Richard Hult
ee283b058a Simplify (get the origin directly from the window).
2007-06-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c:
	(synthesize_crossing_events_for_ns_event): Simplify (get the
	origin directly from the window).

svn path=/trunk/; revision=18315
2007-06-30 19:55:20 +00:00
Richard Hult
a598c633b5 No need to special case the root window now that it has the right size.
2007-06-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (create_crossing_event),
	(synthesize_crossing_events), (find_mouse_window_for_ns_event),
	(synthesize_crossing_events_for_ns_event): No need to special case
	the root window now that it has the right size.

svn path=/trunk/; revision=18314
2007-06-30 19:50:31 +00:00
Richard Hult
95f61d98f3 Improve comments in those files. Add a debugging helper to print out
2007-06-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c:
	* gdk/quartz/gdkevents-quartz.c: Improve comments in those
	files. Add a debugging helper to print out information about a
	window.

svn path=/trunk/; revision=18313
2007-06-30 19:39:45 +00:00
Richard Hult
d793d416da Make this work properly for the root window.
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 09:12:56 +00:00
Richard Hult
8fd51a225e Improve the tracking rect updating: - No need to override setFrame. - Use
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-30 08:56:50 +00:00
Matthias Clasen
436a34e318 New function to determine if keyboard layouts for both LTR and LTR
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-30 01:43:04 +00:00
Ryan Lortie
e8e5af2d8c Connect the "destroy" signal so that the 'window' pointer is set back to
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-29 16:02:24 +00:00
Richard Hult
9d66399094 Don't steal menu events while the keyboard is grabbed.
2007-06-25  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Don't steal
	menu events while the keyboard is grabbed.

svn path=/trunk/; revision=18231
2007-06-25 19:54:04 +00:00
Richard Hult
b4e0b5339b Fallback to X cursors for the ones that OS X doesn't provide. Fixes bug
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 19:43:22 +00:00
Tor Lillqvist
1d5ef907b2 Revert my attempted overly simple fix for #445284, as it causes a
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
2007-06-25 06:38:58 +00:00
Tim Janik
e7525262bd applied patch from Mark Tiefenbruck to add missing return_if_fail,
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-21 22:37:21 +00:00
Johan Dahlin
f43329fcd6 Fix a typo in a comment
* gdk/quartz/GdkQuartzView.c ([GdkQuartzView -updateTrackingRect]): Fix a typo
    in a comment


svn path=/trunk/; revision=18199
2007-06-19 22:42:51 +00:00
Richard Hult
0932e4be38 Don't create or update the tracking rect in the window, move it to the
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 22:09:56 +00:00
Mathias Hasselmann
708dba5dc6 Restore G_BEGIN_DECLS at the top of this file to make C++ compilers happy.
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-19 18:37:14 +00:00
Richard Hult
decff53495 Forward Mac OS menu shortcut events to the right menu.
2007-06-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Forward
	Mac OS menu shortcut events to the right menu.

svn path=/trunk/; revision=18178
2007-06-17 20:36:26 +00:00
Richard Hult
33ec37ee9e More refactoring of the event handling: Extract synthesizing of crossing
2007-06-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (gdk_event_translate)
	(synthesize_crossing_events_for_ns_event)
	(find_window_for_ns_event): More refactoring of the event
	handling: Extract synthesizing of crossing events from
	find_window_for_ns_event so that it doesn't have any side effects,
	and call the new function from gdk_event_translate instead.

svn path=/trunk/; revision=18176
2007-06-17 18:41:36 +00:00
Richard Hult
cd03a9e977 Remove pointless logging for unhandled events. Activate the application on
2007-06-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (find_window_for_ns_event),
	(gdk_event_translate): Remove pointless logging for unhandled events.
	Activate the application on non-left clicks, since that is only done
	for left clicks and we depend on it to get events routed properly for
	context menus and other popup windows.

svn path=/trunk/; revision=18175
2007-06-17 14:29:21 +00:00
Xan Lopez
9a0af6de47 replace GDK_WINDOW calls by cast to GdkWindow. Patch by Tilman Sauerbeck
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-17 11:24:25 +00:00
Richard Hult
e206f6dd3a Ignore events and break any grabs while the window is being dragged.
2007-06-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (gdk_event_translate): Ignore
	events and break any grabs while the window is being dragged.

svn path=/trunk/; revision=18165
2007-06-16 21:39:42 +00:00
Richard Hult
526fecc2f9 Defer setting the parent until the window is shown, otherwise it gets
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 21:21:52 +00:00
Richard Hult
2902d87a22 Move the checks for no window or a non-GDK window from here...
2007-06-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (find_mouse_window_for_ns_event):
	Move the checks for no window or a non-GDK window from here...
	(gdk_event_translate): ...to here. Reorder the code so that we
	detect the cases where we need to break grabs before bailing
	out.

svn path=/trunk/; revision=18161
2007-06-16 16:16:43 +00:00
Richard Hult
4fd1fb4d9b Break out into a separate function.
2007-06-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (gdk_event_translate) 
	(break_all_grabs): Break out into a separate function.

svn path=/trunk/; revision=18160
2007-06-16 15:43:23 +00:00
Richard Hult
48a45ff672 Implement, to be used to detect if the window is currently being moved
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 15:41:27 +00:00
Richard Hult
f55096fc74 Don't set parent/child relationship for tooltip windows since that moves
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-16 15:38:33 +00:00
Hans Breuer
49fc7e15ee updated explicit usage of RegisterClassExW to match the WNDCLASSEXW. True
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-15 15:25:50 +00:00
Tor Lillqvist
eb1876f305 Use g_win32_get_windows_version() instead of _winver so that this compiles
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-14 09:41:08 +00:00
Behdad Esfahbod
e7ad5239a5 #undef GDK_DISABLE_DEPRECATED to get prototype for gdk_font_ref().
2007-06-13  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/directfb/gdkgc-directfb.c: #undef GDK_DISABLE_DEPRECATED to
        get prototype for gdk_font_ref(). (#447163, Dann Frazier, Loïc Minier)


svn path=/trunk/; revision=18126
2007-06-13 21:24:21 +00:00
Matthias Clasen
f7add802e2 Remove linux-fb leftovers
svn path=/trunk/; revision=18113
2007-06-13 02:07:15 +00:00
Behdad Esfahbod
1adaeba11f Improve docs. (#446138, Björn Lindqvist)
2007-06-12  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkwindow.c (gdk_window_get_pointer): Improve docs.
        (#446138, Björn Lindqvist)


svn path=/trunk/; revision=18109
2007-06-12 05:34:26 +00:00
Matthias Clasen
9b8d335ade Handle child_setup being NULL. (#445691, Christopher Taylor)
2007-06-10  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkspawn-x11.c (set_environment): Handle child_setup
        being NULL.  (#445691, Christopher Taylor)



svn path=/trunk/; revision=18097
2007-06-11 00:18:51 +00:00
Michael Natterer
f7ba83c613 fix angles by flipping the coordinate system back to its original y
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 16:29:31 +00:00
Cody Russell
83d5a36c9f Don't revert the mouse cursor to the built-in one when the user holds the
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-10 16:13:09 +00:00