Commit Graph

2160 Commits

Author SHA1 Message Date
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
Matthias Clasen
1a2274e7be Be more careful about toplevel possibly being NULL. (#402453, Sebastian
2007-01-30  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
        (gdk_x11_window_set_user_time): Be more careful about toplevel
        possibly being NULL.  (#402453, Sebastian Bacher)



svn path=/trunk/; revision=17236
2007-01-30 18:36:44 +00:00
Matthias Clasen
788b391cef Reduce locking overhead by not repeatedly getting the paintable iface.
2007-01-25  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkwindow.c: Reduce locking overhead by not repeatedly getting
        the paintable iface.



svn path=/trunk/; revision=17213
2007-01-25 14:24:53 +00:00
Michael David Emmel
b446db4992 Mouse crossing fixes from Attilio
svn path=/trunk/; revision=17195
2007-01-20 07:05:55 +00:00
Robert Oegren
f7687a8b9c Fix for bug #143460 - missed tablet clicks on Windows
2007-01-19  Robert Oegren  <gtk@roboros.com>

	Fix for bug #143460 - missed tablet clicks on Windows

	* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check):
	Request absolute reporting of tablet button state, and cut down
	the packet queue size a bit.
	(_gdk_input_other_event): Change button state handling
	accordingly. Also drop the no longer necessary code that detects
	missed clicks/releases for button 1. The switch to absolute button
	state should prevent missed events for all buttons. Additionally,
	swap button 2 and 3.
	(_gdk_input_grab_pointer): Don't reset button_state, that will only
	cause a new press event as soon as the next tablet packet arrives.


svn path=/trunk/; revision=17188
2007-01-19 02:38:46 +00:00
Tor Lillqvist
f6b4585c98 Build Wintab support always on Windows. Don't require the Wintab SDK.
2007-01-19  Tor Lillqvist  <tml@novell.com>

	Build Wintab support always on Windows. Don't require the Wintab
	SDK.

	* configure.in: Drop the --with-wintab option. Drop the
	HAVE_WINTAB feature test macro and Automake variable.

	* acconfig.h
	* config.h.win32.in: Drop HAVE_WINTAB.

	* gdk/win32/gdkevents-win32.c 
	* gdk/win32/gdkinput.c 
	* gdk/win32/gdkinput-win32.h 	
	* gdk/win32/gdkinput-win32.c
	* gdk/win32/gdkmain-win32.c: Make HAVE_WINTAB ifdef blocks
	unconditional.

	* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Try
	to load wintab32.dll dynamically here. If it is found look up the
	handful Wintab functions we use.
	(rest of file): Use these function pointers instead of calling the
	functions from wntab32x.lib. The code in wntab32x.lib did the same
	thing anyway: tried to load wintab32.dll, and looked up the
	addresses of the actual functions from it.

	* gdk/Makefile.am
	* gdk/win32/Makefile.am: Drop the libwntab32x hacks.

	* gdk/win32/wintab.h
	* gdk/win32/pktdef.h: New files. Copied from the Wintab
	SDK. Copyright blurb says: "The text and information contained in
	this file may be freely used, copied, or distributed without
	compensation or licensing restrictions."

	* README.win32: Update a bit. Remove the text about the Wintab
	SDK.


svn path=/trunk/; revision=17186
2007-01-19 01:55:52 +00:00
Tor Lillqvist
f1ce05caa9 gdk-pixbuf/Makefile.am gdk/Makefile.am gdk/win32/Makefile.am Fixes for
2007-01-18  Tor Lillqvist  <tml@novell.com>

	* gdk-pixbuf/Makefile.am
	* gdk/Makefile.am
	* gdk/win32/Makefile.am
	* gtk/Makefile.am: Fixes for building outside srcdir on
	Win32. (#336819, #340113) Drop distributing the handmade .la
	libtool wrapper for the wntab32x library. It's too much trouble
	making it work when building outside srcdir. Just link to the
	library direcly using -Wl,win32/libwntab32x.a.


svn path=/trunk/; revision=17185
2007-01-19 00:06:01 +00:00
Behdad Esfahbod
34700fe659 Use pango_matrix_transform_rectangle(). (#340141)
2007-01-10  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkpango.c (gdk_draw_layout_with_colors):
        * gtk/gtklabel.c (gtk_label_size_request):
        Use pango_matrix_transform_rectangle(). (#340141)

        * configure.in: Bump pango requirement to 1.15.3.


svn path=/trunk/; revision=17129
2007-01-10 20:21:26 +00:00
Tor Lillqvist
8d601fbde3 New file. Downloaded from freedesktop.org's webcvs. Slighly edited cursors
2007-01-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/cursor.bdf: New file. Downloaded from
	freedesktop.org's webcvs. Slighly edited cursors "crosshair",
	"diamond_cross", "draft_large", "gobbler" and "target" to fix
	#392504. It is possible that the same end result could have been
	achieved by tweaking bdfcursor.c instead.
	
	* gdk/win32/bdfcursor.c: Add optional debugging output.

	* gdk/win32/xcursors.h: Regenerated.


svn path=/trunk/; revision=17096
2007-01-06 03:05:37 +00:00
Behdad Esfahbod
b4328913d8 Avoid overflow when converting coordinates to Pango units. (#332266, Jody
2007-01-05  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkprivate.h:
        * gdk/gdkpango.c (gdk_draw_layout_line_with_colors),
        (gdk_draw_layout_with_colors):
        * gdk/gdkwindow.c (gdk_window_draw_glyphs_transformed):
        Avoid overflow when converting coordinates to Pango units. (#332266,
        Jody Goldberg)


svn path=/trunk/; revision=17075
2007-01-05 06:16:32 +00:00
Matthias Clasen
3b54167d99 Cross-compilation fixes. (#392646, Yevgen Muntyan)
2007-01-04  Matthias Clasen  <mclasen@redhat.com>

        * gtk/Makefile.am:
        * gdk-pixbuf/Makefile.am:
        * configure.in:
        * gdk/win32/rc/gdk.rc.in: Cross-compilation fixes.
        (#392646, Yevgen Muntyan)



svn path=/trunk/; revision=17065
2007-01-04 15:05:07 +00:00
Matthias Clasen
1c2718400d Apply a patch by Chris Wilson to avoid spurious valgrind warnings from
2007-01-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c:
        * gdk/x11/*.c: Apply a patch by Chris Wilson to
        avoid spurious valgrind warnings from XSendEvent()
        calls.  (#392532)

svn path=/trunk/; revision=17044
2007-01-04 01:28:07 +00:00
Matthias Clasen
129ad4b48d Try to fix #315732, reported by Luke Hutchinson:
2007-01-02  Matthias Clasen  <mclasen@redhat.com>

        Try to fix #315732, reported by Luke Hutchinson:

        * gdk/x11/xsettings-client.[hc]:
        * gdk/x11/gdkdevents-x11.c: Don't assume that ref'ing a GdkWindow
        will guarantee that it can be looked up in the xid hash later.
        Also, use the nesting server grab function during the xsettings
        client initialization. Finally, make xsettings client not
        eat DestroyNotifys so that GDK can do its regular cleanup.



svn path=/trunk/; revision=17022
2007-01-02 19:07:03 +00:00
Michael David Emmel
52297a75b8 Fix for leak when window destroyed
svn path=/trunk/; revision=17014
2007-01-02 09:05:54 +00:00
Matthias Clasen
ba7b79d187 Fix a typo 2006-12-29 18:43:40 +00:00
Matthias Clasen
61f5f016db Fix some formatting errors in docs.
2006-12-28  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdk.c: Fix some formatting errors in docs.
2006-12-28 21:22:23 +00:00
Mikael Hallendal
693c3c2649 Factored out the event loop integration into gdkeventloop-quartz.c.
2006-12-28  Mikael Hallendal  <micke@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: Factored out the event loop
	integration into gdkeventloop-quartz.c.

	* gdk/quartz/Makefile.am: Added gdkeventloop-quartz.c

	* gdk/quartz/gdkeventloop-quartz.c: New file containing the event loop
	integration.
2006-12-28 09:04:48 +00:00
Matthias Clasen
90532005ee Remove redundant declarations (#390097, Christian Persch)
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdk.h: Remove redundant declarations (#390097,
        Christian Persch)
2006-12-28 04:19:49 +00:00
Kristian Rietveld
0677ad8e59 Support inverting arrows via XSetting. (#377979, Yevgen Muntyan).
2006-12-27  Kristian Rietveld  <kris@gtk.org>

	Support inverting arrows via XSetting. (#377979, Yevgen Muntyan).

	* gtk/gtksettings.c (gtk_settings_class_init): add new setting
	gtk-alternative-sort-arrows.

	* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): add
	new setting.

	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: set new
	gtk-alternative-sort-arrows setting to true.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
	invert direction if gtk-alternative-sort-arrows is TRUE.
2006-12-27 19:52:25 +00:00
Behdad Esfahbod
d698e3eaf2 Bug 340141 – Update to Pango 1.16 API
2006-12-24  Behdad Esfahbod  <behdad@gnome.org>

        Bug 340141 – Update to Pango 1.16 API

        * gdk/gdkpango.c (layout_iter_get_line_clip_region),
        (gdk_pango_layout_line_get_clip_region):
        * gtk/gtkcalendar.c (gtk_calendar_size_request):
        * gtk/gtkentry.c (gtk_entry_get_pixel_ranges),
        (get_layout_position), (gtk_entry_find_position),
        (gtk_entry_adjust_scroll):
        * gtk/gtkiconview.c (get_pango_text_offsets):
        * gtk/gtklabel.c (get_cursor_direction):
        * gtk/gtkstyle.c (get_insensitive_layout):
        * gtk/gtktextdisplay.c (render_para):
        * gtk/gtktextlayout.c (allocate_child_widgets),
        (find_display_line_below), (find_display_line_above),
        (gtk_text_layout_move_iter_to_previous_line),
        (gtk_text_layout_move_iter_to_next_line),
        (gtk_text_layout_move_iter_to_line_end),
        (gtk_text_layout_iter_starts_line),
        (gtk_text_layout_move_iter_to_x):
        * gtk/gtktextutil.c (limit_layout_lines):
        Use the _readonly version of pango_layout_iter_get_line(),
        pango_layout_iter_get_run(), pango_layout_get_line(), and
        pango_layout_get_lines().

        * gtk/gtkmain.c (gtk_get_default_language): Use
        pango_get_default_language().
2006-12-24 05:29:25 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Matthias Clasen
7854bd1b6e Add functions to allow threadsafe handling of idles and timeouts wrt. to
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdk.symbols:
        * gdk/gdk.h:
        * gdk/gdk.c: Add functions to allow threadsafe handling
        of idles and timeouts wrt. to the GDK lock.  (#321886,
        Chris Wilson)
2006-12-22 17:46:32 +00:00
Matthias Clasen
1bed6b434c Use pango_cairo_show_error_underline. (#340141, Behdad Esfahbod)
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkpango.c: Use pango_cairo_show_error_underline.
        (#340141, Behdad Esfahbod)
2006-12-22 17:06:30 +00:00
Matthias Clasen
34dc82c312 Generate double-click events. (#380421, Tommi Komulainen)
* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event):
        Generate double-click events.  (#380421, Tommi Komulainen)
2006-12-21 16:33:29 +00:00
Matthias Clasen
168659a3b7 Correct return_if_fail checks. (#379803, Tommi Komulainen)
* gdk/x1/gdkinput-xfree.c (_gdk_input_configure_event):
        (_gdk_input_enter_event): Correct return_if_fail checks.
        (#379803, Tommi Komulainen)
2006-12-21 16:28:28 +00:00
Matthias Clasen
10f7248d27 Improve docs. (#353438, Mariano Suárez-Alvarez)
2006-12-21  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkdisplay.c (gdk_display_beep): Improve docs.
        (#353438, Mariano Suárez-Alvarez)
2006-12-21 16:25:01 +00:00
Matthew Barnes
96b3419dff Add a function for converting a GdkColor to a string (#373856).
2006-12-21  Matthew Barnes  <mbarnes@redhat.com>

	* docs/reference/gdk/gdk-sections.txt:
	* gdk/gdkcolor.[ch] (gdk_color_to_string): Add a function for
	converting a GdkColor to a string (#373856).

	* configure.in: Bump pango requirement to 1.15.2.
2006-12-21 12:34:41 +00:00
Matthias Clasen
410292525d Mark arrow keys as translatable 2006-12-21 05:11:00 +00:00
Mikael Hallendal
7c92045621 Splitted out the GdkPixbuf to NSImage routine so that it can be used from
2006-12-19  Mikael Hallendal  <micke@imendio.com>

	* gdk/quartz/gdkcursor-quartz.c: Splitted out the GdkPixbuf to NSImage
	routine so that it can be used from libgtk as well (needed for
	upcoming GtkStatusIcon support in the Quartz port).
	* gdk/quartz/gdkevents-quartz.c: Don't assume that all NSWindows are
	created from GDK, this is not true for the status icon.
	* gdk/quartz/gdkprivate-quartz.h:
	* gdk/quartz/gdkquartz.h: Added
	gdk_quartz_pixbuf_to_ns_image_libgtk_only so that it is available to
	the status icon code.
2006-12-19 15:53:44 +00:00
Matthias Clasen
392492c0f8 Check for crt_extern.h and _NSGetEnviron. Fix compilation on Darwin where
2006-12-10  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Check for crt_extern.h and _NSGetEnviron.
        * gdk/x11/gdkspawn-x11.c: Fix compilation on Darwin where
        environ is not available.  (#384168, Min Sik Kim)
2006-12-10 06:31:53 +00:00
Tor Lillqvist
1739daf8e0 Implement for B&W cursors, for instance the built-in GDK ones.
2006-10-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c
	(gdk_win32_icon_to_pixbuf_libgtk_only): Implement for B&W cursors,
	for instance the built-in GDK ones.
2006-10-29 00:17:11 +00:00
Tor Lillqvist
52b1bac8ec Improve handling of the small icon of the window class. (#152620, Kazuki
2006-10-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Improve handling
	of the small icon of the window class. (#152620, Kazuki Iwamoto)
2006-10-28 23:58:30 +00:00
Michael David Emmel
21f1e75d94 gdkpixmap-directfb.c: add missing RGB24 case (#361176) 2006-10-11 15:42:35 +00:00
Matthias Clasen
40e359d893 Update the docs to state which out parameters may be NULL. (#360870,
2006-10-09  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Update the docs to state which out parameters may be NULL.
        (#360870, Attilio Fiandrotti)
2006-10-09 14:36:16 +00:00
Michael David Emmel
b140b48e71 Fix for bug 3575611 strdup property name so it can be freed 2006-10-08 14:54:24 +00:00
Matthias Clasen
241ff0b6bd Cleanups 2006-10-08 05:32:07 +00:00
Matthias Clasen
70ae6a0e83 Apply a patch by Behdad Esfahbod to reduce relocations. (#359053)
2006-10-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c, gdk/*.c: Apply a patch by Behdad Esfahbod to
        reduce relocations. (#359053)
2006-10-03 15:54:52 +00:00
Behdad Esfahbod
1f33657330 Include pltcheck.sh in EXTRA_DIST.
2006-10-02  Behdad Esfahbod  <behdad@gnome.org>

        * gdk-pixbuf/Makefile.am:
        * gdk/Makefile.am:
        * gtk/Makefile.am:
        Include pltcheck.sh in EXTRA_DIST.
2006-10-02 18:02:15 +00:00
Behdad Esfahbod
b6a5bbb514 Move all includes before including gdkalias.h.
2006-10-02  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/x11/gdkevents-x11.c: Move all includes before including
        gdkalias.h.
2006-10-02 17:34:17 +00:00
Michael Natterer
e049989bc3 free display->input_windows with g_free(), not g_object_unref() (#357566,
2006-09-25  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
	display->input_windows with g_free(), not g_object_unref()
	(#357566, Tommi Komulainen).
2006-09-25 09:58:20 +00:00
Michael Natterer
2f50232a42 Implement lots of value setters for GdkGC, based on a heavily modified
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 17:05:33 +00:00
Michael Natterer
c148c41bab fix cast: it's drawable_impl->wrapper that is the GdkWindow, not the
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-21 11:19:25 +00:00
Behnam Esfahbod
a0c6753511 just check the first shift-level of keyboard layout for RTL and LTR
2006-09-20  Behnam Esfahbod <behnam@zwnj.org>
	* gdk/x11/gdkkeys-x11.c:
	  (get_direction): just check the first shift-level of keyboard
	  layout for RTL and LTR keysyms() (compliment to #116626)
2006-09-20 17:47:28 +00:00
Ryan Lortie
6893f3ef08 Bug 355343. Add a GdkPangoAttrEmbossColor.
2006-09-19  Ryan Lortie  <desrt@desrt.ca>

	* docs/reference/gdk/gdk-sections.txt:
	* gdk/gdk.symbols:
	* gdk/gdkpango.h:
	* gdk/gdkpango.c: Bug 355343.  Add a GdkPangoAttrEmbossColor.
	  (gdk_pango_layout_get_clip_region): Remove an unused variable.
	  (gdk_pango_attr_embossed_new): Fix documentation.
2006-09-19 16:37:41 +00:00
Michael David Emmel
48d1be65e3 /tmp/cvsX7MHVx 2006-09-14 02:56:20 +00:00
Michael David Emmel
539414d677 gdk/directfb/gdkcolor-directfb.c small clean ups include order
gdk/directfb/gdkwindow-directfb.c fixed beep compile error
gdk/directfb/Makefile.am removed GDK_PIXBUF_DISABLE_DEPRECATED
     GDK_DISABLE_DEPRECATED to allow compile per Behdad
gdk/quartz/Makefile.am same change as directfb Makefile
gtk/Makefile.am fixed typo that cause socket stubs not to compile
2006-09-14 02:56:01 +00:00
Tor Lillqvist
8a99fbc640 gdk/win32/gdkprivate-win32.h gdk/win32/gdkmain-win32.c Define WINVER and
2006-09-10  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkwindow-win32.c: Define WINVER and _WIN32_WINNT as
	0x0500 in gdkprivate-win32.h instead of doing it in two source
	files. (#355212, Mike Edenfield)

	* gdk/win32/gdkwindow-win32.c: We can also remove the ersatz
	GetAncestor() for the _MSC_VER && WINVER < 0x0500 case, I hope.
2006-09-10 17:33:29 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
2006-09-10  Matthias Clasen  <mclasen@redhat.com>

        * Commit a patch by Behdad to fix typos, omissions and other
        errors in the symbol aliasing, and add checks for local PLT
        entries.  (#354687, Behdad Esfahbod)
2006-09-10 06:39:16 +00:00
Matthias Clasen
c9c586dd3a Fix small theoretical memory leaks. (#353916, Chris Wilson)
2006-09-09  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkfonts-x11.c: Fix small theoretical memory leaks.
        (#353916, Chris Wilson)
2006-09-09 05:31:07 +00:00
Richard Hult
7724832996 Special-case shift-tab and map it to GDK_ISO_Left_Tab, fixes bug #350806.
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-06 17:29:28 +00:00
Tor Lillqvist
25b98a5935 gdk/win32/gdkevents-win32.c Use wide-char API for message and window
2006-09-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkwindow-win32.c: Use wide-char API for message and
	window handling (PeekMessage, PostMessage, SendMessage,
	DispatchMessage, DefWindowProc, RegisterClassEx,
	CreateWindowEx). (#321597)
2006-09-03 22:50:00 +00:00
Richard Hult
611f5526e9 Don't do anything if exposure isn't in the event mask, plug a leak, and
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-09-03 10:46:32 +00:00
Matthias Clasen
805782a574 Handle display_name being NULL. (#354004, Chris Wilson)
2006-09-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (post_parse_hook):
	* gdk/gdk.c (gdk_init): Handle display_name being NULL.
	(#354004, Chris Wilson)
2006-09-03 05:26:45 +00:00
Tor Lillqvist
f3ce0228a5 No GDK_WINDOW_DISPLAY in the Win32 backend.
2006-09-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_beep): No
	GDK_WINDOW_DISPLAY in the Win32 backend.

	* gtk/gtkfilesystemwin32.c: Copy what Kris did to
	gtkfilesystemunix.c
2006-09-02 21:42:42 +00:00
Michael Natterer
06e446c60d Fix build.
2006-08-31  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Fix build.
2006-08-31 08:41:32 +00:00
Richard Hult
5467cb3cdc Fix build.
2006-08-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep): Fix build.
2006-08-30 18:18:09 +00:00
Matthias Clasen
e28876d95e Fix gdk_window_beep 2006-08-30 16:02:41 +00:00
Matthias Clasen
6760faeb4b Add a function to beep on a window. For X11, implement this with XkbBell.
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-30 03:30:43 +00:00
Tor Lillqvist
4e3d7dd088 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
2006-08-29  Tor Lillqvist  <tml@novell.com>

	Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x
	since 2.6 or 2.8. It's pointless to keep the Win9x code in here as
	it isn't being maintained anyway. If somebody is interested, it
	can always be found in older GTK+ versions, and in CVS.

	* gdk/win32/gdkwindow-win32.c: Remove the G_WIN32_IS_NT_BASED()
	and G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
	branches, and any variables or static functions used only by the
	Win9x branches.
2006-08-30 00:39:01 +00:00
Tor Lillqvist
1ff434a681 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
2006-08-29  Tor Lillqvist  <tml@novell.com>

	Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x
	since 2.6 or 2.8. It's pointless to keep the Win9x code in here as
	it isn't being maintained anyway. If somebody is interested, it
	can always be found in older GTK+ versions, and in CVS.

	* gdk/win32/gdkcursor-win32.c
	* gdk/win32/gdkdnd-win32.c
	* gdk/win32/gdkdrawable-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkkeys-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkproperty-win32.c
	* gdk/win32/gdkselection-win32.c: Remove the G_WIN32_IS_NT_BASED()
	and G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
	branches, and any variables or static functions used only by the
	Win9x branches.

	* gdk/win32/gdkprivate-win32.h: Remove backup definitions for
	constants that aren't missing from current mingw and MSVC6
	headers.

	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkprivate-win32.h: Remove the _gdk_win32_gdi_failed()
	function. On NT-based Windows GetLastError() returns error codes
	also for failed GDI calls, so we can use _gdk_win32_api_failed()
	always.
2006-08-29 23:01:53 +00:00
Tor Lillqvist
019fece724 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
2006-08-29  Tor Lillqvist  <tml@novell.com>

	Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x
	since 2.6 or 2.8. It's pointless to keep the Win9x code in here as
	it isn't being maintained anyway. If somebody is interested, it
	can always be found in older GTK+ versions, and in CVS.

	* configure.in
	* acconfig.h
	* gdk/Makefile.am
	* gdk/win32/Makefile.am
	* gdk/win32/libie55uid.la
	* gdk/win32/gdkevents-win32.c: Remove the --with-ie55 configure
	switch and associated stuff. Active IMM and the <dimm.h> header
	was used for IM support on NT4 and Win9x. Win2k and later have IM
	support built-in.

	* gdk/win32/gdkevents-win32.c: Remove the G_WIN32_IS_NT_BASED()
	and G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
	branches, and any variables or static functions used only by the
	Win9x branches.
2006-08-29 22:55:31 +00:00
Michael Natterer
4773f80c48 return the hostname instead of NULL.
2006-08-24  Michael Natterer  <mitch@imendio.com>

	* gdk/quartz/gdkdisplay-quartz.c (gdk_display_get_name): return
	the hostname instead of NULL.
2006-08-24 19:41:40 +00:00
Tor Lillqvist
1c816b805c Add Win32 detail to doc comments.
2006-08-23  Tor Lillqvist  <tml@novell.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
	(gdk_window_input_shape_combine_mask)
	gdk_window_shape_combine_region)
	(gdk_window_input_shape_combine_region): Add Win32 detail to doc
	comments.
2006-08-23 00:25:10 +00:00
Richard Hult
382ef872b4 Add GDK button mask for NS dragging events. (create_scroll_event): Remove
2006-08-15  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (get_event_mask_from_ns_event):
	Add GDK button mask for NS dragging events.
	(create_scroll_event): Remove obsolete comment.
	(_gdk_quartz_get_current_event_mask), (gdk_event_translate): Keep
	track of the latest event mask here...

	* gdk/quartz/gdkwindow-quartz.c:
	(_gdk_windowing_window_get_pointer): And use it here. Patch from
	Kristian Rietveld.
	(gdk_window_quartz_update_idle): Rename to make things clearer.
2006-08-15 20:13:13 +00:00
Matthias Clasen
c74f0bbf65 Don't leak ShmPixmapInfo. (#349858, Chris Wilson)
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdrawable-x11.c (get_shm_pixmap_for_image): Don't
	leak ShmPixmapInfo.  (#349858, Chris Wilson)
2006-08-15 17:05:00 +00:00
Matthias Clasen
da54d67905 Use XAllocSizeHints to allocate the XSizeHints struct. (#249285, David
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_geometry_hints):
        Use XAllocSizeHints to allocate the XSizeHints struct.
        (#249285, David Baron)
2006-08-15 05:53:58 +00:00
Matthias Clasen
bb279057f3 Zero out some stack-allocated X structures, to avoid valgrind warnings
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_decorations):
        (gdk_window_set_functions): Zero out some stack-allocated
        X structures, to avoid valgrind warnings about uninitialized
        memory.  (#349382, David Baron)
2006-08-15 05:46:08 +00:00
Michael David Emmel
3cdf4f5590 gdk/directfb/gdkdrawable-directfb.c Remove gdk_directfb_update_region and
* gdk/directfb/gdkdrawable-directfb.c
     Remove gdk_directfb_update_region and calls
     * gdk/directfb/gdkwindow-directfb.c
     Code cleanup
     * gdk/directfb/gdkgeometry-directfb.c
     Fix scroll call to use region
2006-08-11 05:44:46 +00:00
Michael Natterer
cac12e4d65 don't try to set the state of unmapped windows, call
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-10 09:16:38 +00:00
Michael Natterer
0802881649 implement MIN_SIZE, MAX_SIZE and RESIZE_INC.
2006-08-09  Michael Natterer  <mitch@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_geometry_hints):
	implement MIN_SIZE, MAX_SIZE and RESIZE_INC.
2006-08-08 22:55:27 +00:00
Michael Natterer
7af7c0a3e3 Shutup CVS 2006-08-08 22:47:57 +00:00
Richard Hult
230fcecae8 Whitespace cleanup. (synthesize_crossing_events): Add comments and prevent
2006-08-08  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup.
	(synthesize_crossing_events): Add comments and prevent a crash.
2006-08-08 21:06:03 +00:00
Michael Natterer
d451252f73 implement.
2006-08-08  Michael Natterer  <mitch@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c
	(gdk_window_maximize)
	(gdk_window_unmaximize): implement.

	(gdk_window_iconify)
	(gdk_window_deiconify): remove unneeded autorelease pools.
2006-08-08 21:00:23 +00:00
Richard Hult
d3ee9f833a Just expose the minimal region instead of the whole rect.
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 20:53:09 +00:00
Michael Natterer
f2faaf2fd8 some whitespace and indentation cleanup.
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-08 09:12:10 +00:00
Richard Hult
d2014a6084 Don't get and release the context for each point, just once, speeds up
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-08-07 16:45:16 +00:00
Matthias Clasen
c6985e1394 Free all XKB data. (#349997, Chris Wilson)
2006-08-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_finalize): Free
	all XKB data. (#349997, Chris Wilson)
2006-08-06 06:01:18 +00:00
Michael David Emmel
468a7bc2f9 Removed unused call to GetPosition 2006-08-02 21:45:53 +00:00
Richard Hult
0cb61e8a48 Patch from Erik van Pienbroek to implement drawing bg_pixmaps (#348145).
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-31 21:05:12 +00:00
Richard Hult
571c460503 Always set success to TRUE. (gdk_color_change): Implement.
2006-07-29  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkcolor-quartz.c (gdk_colormap_alloc_colors): Always
	set success to TRUE.
	(gdk_color_change): Implement.

	* gdk/quartz/GdkQuartzWindow.c
	([GdkQuartzWindow -canBecomeKeyWindow]): Add comment.

	* gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Make the
	default font a bit smaller until we have made this get the system
	setting.

	* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Enable
	shadows for the right window types.

	* gdk/quartz/gdkprivate-quartz.h:
	* gdk/quartz/gdkgc-quartz.c:
	* gdk/quartz/gdkdrawable-quartz.c:
	* gdk/quartz/gdkcolor-quartz.c: Expose the CGContext functions,
	update callers.

	* gdk/quartz/gdkmain-quartz.c: (_gdk_windowing_init): No need to
	get the current process ID, use the right constant instead.
2006-07-29 11:05:15 +00:00
Michael Natterer
8022523767 cast the return value of XGetWindowProperty() correctly so we don't return
2006-07-27  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): cast the
	return value of XGetWindowProperty() correctly so we don't return
	garbage type hints. Pointed out by Tommi Komulainen, patch taken
	from https://maemo.org/bugzilla/show_bug.cgi?id=724
2006-07-27 15:22:13 +00:00
Richard Hult
348bffc856 Implement getting the double click threshold.
2006-07-24  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Implement
	getting the double click threshold.
2006-07-24 12:31:17 +00:00
Richard Hult
7a3c18ab7b Set the window level depending on the type hint.
2006-07-24  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Set the
	window level depending on the type hint.

	* gdk/quartz/gdkevents-quartz.c (gdk_keyboard_grab,
	pointer_ungrab_internal): Only break the grab if the new window is
	a different one.
	(gdk_event_translate): Catch the case where the entire app loses
	focus and break any grabs. Only do implicit grabs when the event
	mask has both press and release.

	* gdk/quartz/gdkkeys-quartz.c (translate_keysym):
	* gdk/quartz/gdkselection-quartz.c:

        * gdk/quartz/GdkQuartzWindow.c
	([GdkQuartzWindow -windowDidResignKey:]): Use this to update the
	focus window instead of resignMain, fixes the case where other apps
	uses focus follows mouse (like the terminal can).
2006-07-24 10:46:21 +00:00
Richard Hult
a0cdff6cca Implement.
2006-07-21  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkgc-quartz.c: (gdk_quartz_gc_get_values),
	(gdk_quartz_gc_set_values), (_gdk_windowing_gc_copy),
	(gdk_gc_get_screen): Implement.

	* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_back_pixmap):
	Implement.
2006-07-21 15:17:59 +00:00
Richard Hult
cb5f9e62e9 Append the event to the queue instead of using gdk_event_put.
2006-07-20  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (generate_grab_broken_event):
	Append the event to the queue instead of using gdk_event_put.
	(_gdk_quartz_get_mouse_window, find_current_keyboard_window):
	Handle grabs.
	(get_event_mask_from_ns_event, create_focus_event)
	(convert_window_coordinates_to_root, find_window_for_event)
	(gdk_event_translate): Improve readability (style changes).
	(gdk_flush, gdk_display_sync, gdk_display_flush)
	(gdk_event_send_client_message_for_display),
	(gdk_screen_broadcast_client_message): Remove FIXMEs.
	(gdk_screen_get_setting): Reindent.
	Also move find_child_window_by_point to gdkwindow-quartz.c.

	* gdk/quartz/gdkwindow-quartz.c:
	(find_child_window_by_point_helper),
	(_gdk_quartz_find_child_window_by_point): Move here from
	gdkevents-quartz.c
	(_gdk_windowing_window_get_pointer): Handle destroyed windows and
	imlement the return value.
	(_gdk_windowing_window_at_pointer): Implement.
2006-07-20 08:06:54 +00:00
Richard Hult
d3973cb865 ]): Listen to windowDidResignMain notifications and properly update the
2006-07-19  Richard Hult  <richard@imendio.com>

	* gdk/quartz/GdkQuartzWindow.c
	([GdkQuartzWindow -windowDidResignMain:]):
	* gdk/quartz/gdkevents-quartz.c (_gdk_quartz_update_focus_window):
	Listen to windowDidResignMain notifications and properly update the
	focus window when windows are unfocused.
2006-07-19 17:06:40 +00:00
Matthias Clasen
b1d1801875 When looking up a font XID, add the XID_FONT_BIT. (#348001)
2006-07-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkx.h (gdk_font_lookup_for_display): When looking
	up a font XID, add the XID_FONT_BIT.  (#348001)
2006-07-19 13:36:52 +00:00
Richard Hult
157ba89508 ]): Remove unused variables to fix compiler warnings.
2006-07-19  Richard Hult  <richard@imendio.com>

	* gdk/quartz/GdkQuartzView.c ([GdkQuartzView -drawRect:]):
	* gdk/quartz/gdkpixmap-quartz.c (gdk_pixmap_new): Remove unused
	variables to fix compiler warnings.
2006-07-19 09:15:58 +00:00
Richard Hult
7f15d73769 Implement type hints and use them to determine which windows should be
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 09:13:24 +00:00
Richard Hult
53b0354823 Get the position correctly for the root window. Fixes bug #347976, patch
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-19 07:28:42 +00:00
Richard Hult
d473868ace Fill in string, length and is_modifier for key events. Map some more keys
2006-07-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (create_key_event):
	* gdk/quartz/gdkkeys-quartz.c: (_gdk_quartz_key_event_type),
	(_gdk_quartz_key_is_modifier):
	* gdk/quartz/gdkprivate-quartz.h: Fill in string, length and
	is_modifier for key events. Map some more keys into gdk keyvals.
2006-07-17 18:39:43 +00:00
Richard Hult
da6c726ce0 Add escape to the list of special keys, to get the escape key working.
2006-07-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkkeys-quartz.c: Add escape to the list of special
	keys, to get the escape key working.
2006-07-17 15:43:55 +00:00
Richard Hult
b4f78d06f8 Initialize GdkInput.
2006-07-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkdisplay-quartz.c (gdk_display_open): Initialize
	GdkInput.
2006-07-17 14:48:10 +00:00
Richard Hult
2d41ff51f5 Fix comment. (gdk_window_set_title): Surround by release pool macros.
2006-07-17  Richard Hult  <richard@imendio.com>

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

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

	* gdk/quartz/gdkcursor-quartz.c (gdk_cursor_new_for_display):
	Map some more cursors.
2006-07-17 08:07:55 +00:00
Matthias Clasen
5175386051 Add some more detail to the docs. (#311399, Nikos Kouremenos)
2006-07-17  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkwindow.c (gdk_window_get_pointer): Add some more
	detail to the docs.  (#311399, Nikos Kouremenos)
2006-07-17 04:19:59 +00:00
Michael David Emmel
73d7327b35 Lots of changes the major change is GdkPaintable is not implemented by window
This code also requires a major redo of the cairo implementation now in
cairo cvs.
2006-07-14 00:17:52 +00:00
Matthias Clasen
81334ac0d3 Don't confuse gtk-doc.
2006-07-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/directfb/gdkwindow-directfb.c: Don't confuse gtk-doc.
2006-07-10 13:32:15 +00:00
Richard Hult
4904b59030 Account for alignment when reading xbm data. (#346721, patch by Dave
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-10 09:54:21 +00:00
Richard Hult
451543039a Implement some more stubs for pygtk, bug #346713.
2006-07-09  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkgeometry-quartz.c:
	* gdk/quartz/gdkmain-quartz.c:
	* gdk/quartz/gdkpixmap-quartz.c:
	* gdk/quartz/gdkwindow-quartz.c:
	* gtk/gtkclipboard-quartz.c: Implement some more stubs for pygtk,
	bug #346713.
2006-07-09 18:09:09 +00:00
Richard Hult
faed5298bd Release the pool in all cases. (move_resize_window_internal): Surround by
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-09 07:50:44 +00:00
Behdad Esfahbod
1f9890c7d8 Fix quadratic implementation of gdk_pango_layout_get_clip_region into a
2006-07-08  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkpango.c (layout_iter_get_line_clip_region),
        (gdk_pango_layout_line_get_clip_region),
        (gdk_pango_layout_get_clip_region): Fix quadratic implementation of
        gdk_pango_layout_get_clip_region into a linear one. (#337910, patch
        by Priit Laes)
2006-07-08 22:58:06 +00:00
Richard Hult
2fbe2ebc9a Generate a grab broken event when appropriate. Fixes bug #346603, patch
2006-07-07  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: Generate a grab broken event when
	appropriate. Fixes bug #346603, patch from Dave Vasilevsky.

	* gdk/quartz/gdkevents-quartz.c:
	* gdk/quartz/gdkkeys-quartz.c:
	* gdk/quartz/gdkprivate-quartz.c: Another patch from Dave Vasilevsky,
	fixes bug #346605. Makes modifier key events being sent properly.
2006-07-07 20:19:22 +00:00
Michael David Emmel
e0d850a2ad Not sure this went in 2006-07-03 06:55:15 +00:00
Matthias Clasen
862e96f9bf Fix root window size changes 2006-06-29 15:13:56 +00:00
Matthias Clasen
03de4627d3 broken pipe 2006-06-28 12:44:30 +00:00
Michael David Emmel
2c6564c875 Added ifdef to compile with 0.9.24 removes creating a child GdkWindow
since it uses functionality only in directfb cvs
2006-06-26 17:50:44 +00:00
Matthias Clasen
72c77cf67c Update the docs. (#345194, Yevgen Muntyan)
2006-06-20  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_functions): Update
	the docs. (#345194, Yevgen Muntyan)
2006-06-20 04:30:11 +00:00
Michael Emmel
0799004f58 updated mininum dfb to 0.9.24 added more directfb wrapper functions
2006-06-14  Michael Emmel  <mike.emmel@gmail.com>
    * configure.in: updated mininum  dfb to 0.9.24
    * gdk/directfb/gdkdirectfb.h: added more directfb wrapper functions
    * gdk/directfb/gdkdrawable-directfb.c: wrapper functions and patch from
     Claudio Ciccani <klan@users.sf.net> to use a subsurface for cairo
    * gdk/directfb/gdkvisual-directfb.c: changed initalization sequence
    * gdk/directfb/gdkwindow-directfb.c: corrected reparent for toplevels
    * gdk/directfb/gdkdisplay-directfb.c: changed initilization sequence
    to a more rational order
2006-06-14 21:54:25 +00:00