Commit Graph

2209 Commits

Author SHA1 Message Date
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
Tor Lillqvist
dd9aefca76 Convert \n to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
2006-06-11  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Convert \n
	to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
	Clipboard. (#344496)
2006-06-11 19:45:56 +00:00
Tor Lillqvist
225d9caf7c Call ReleaseDC() on DCs acquired with GetDC() (for windows), and
2006-06-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (_gdk_win32_drawable_release_dc):
	Call ReleaseDC() on DCs acquired with GetDC() (for windows), and
	DeleteDC() on DCs acquired with CreateCompatibleDC() (for
	bitmaps). According to MSDN, this is the correct thing to do, even
	if always using DeleteDC() seems to have worked fine in
	practice. (#337491)
2006-06-09 09:17:47 +00:00
Tor Lillqvist
f93e5455e9 [WM_WINDOWPOSCHANGED] Replace identical code as in
2006-06-08  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	[WM_WINDOWPOSCHANGED] Replace identical code as in
	handle_configure_event() with call to that function.
	[WM_SIZING] Fix implementation of aspect ratio hints. (#344244)
	The hints are for the geometry of the client area, not of the
	window including decorations. Improve resizing behaviouor in the
	presence of aspect hints, more in line with typical X window
	managers.
2006-06-08 15:00:25 +00:00
Behdad Esfahbod
bd264faea9 Fix typo. 2006-06-07 01:08:16 +00:00
Behdad Esfahbod
d3874d0918 Bug 337603 – Possible off-by-one in
2006-06-06  Behdad Esfahbod  <behdad@gnome.org>

        Bug 337603 – Possible off-by-one in
        gdk_pango_layout_line_get_clip_region

        * gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): Correct
        rounding of rect members.  Improved docs.
2006-06-07 01:07:20 +00:00
Matthias Clasen
150b52e207 Remove the right XID from the xid table. (#34327, Sampo Savolainen, Tim
2006-06-04  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkfont-x11.c (_gdk_font_destroy): Remove the right
        XID from the xid table.  (#34327, Sampo Savolainen, Tim Janik)
2006-06-05 01:14:57 +00:00
Richard Hult
de10529edc Add spawn functions, copied from the win32 backend.
2006-06-03  Richard Hult  <richard@imendio.com>
	* gdk/quartz/Makefile.am:
	* gdk/quartz/gdkspawn-quartz.c: Add spawn functions, copied from the
	win32 backend.
2006-06-03 17:51:34 +00:00
Matthias Clasen
7b12fdbc2a Don't use G_DEFINE_TYPE, since the instance struct name does not match the
2006-05-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkpixmap.c:
	* gdk/gdkwindow.c: Don't use G_DEFINE_TYPE, since the instance
	struct name does not match the type name.  (#343453, Ed Catmur)
2006-05-31 03:34:04 +00:00
Behdad Esfahbod
416b66f3ab Fix offset to center the underline in requested rectangle. (Ported from
2006-05-30  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkpango.c (draw_error_underline): Fix offset to center the
        underline in requested rectangle. (Ported from pango fix.)
2006-05-30 04:19:29 +00:00
Behdad Esfahbod
9ed04de455 Note in docs that @dest can be the same as @src1 or @src2. (#343233,
2006-05-28  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkrectangle.c (gdk_rectangle_union, gdk_rectangle_intersect):
        Note in docs that @dest can be the same as @src1 or @src2. (#343233,
        Christian Persch)
2006-05-28 20:24:43 +00:00
Matthias Clasen
02ed1e9bdb Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
2006-05-25  Matthias Clasen  <mclasen@redhat.com>

	Make GTK+ work as an untrusted X client. (#136571,
	Ed Catmur)
2006-05-25 05:30:14 +00:00
Behdad Esfahbod
fb3eeb8686 Rollback the following changes, to fix it the proper way in Pango:
2006-05-22  Behdad Esfahbod  <behdad@gnome.org>

        Rollback the following changes, to fix it the proper way in Pango:

        * gdk/gdkinternals.h:
        * gdk/gdkscreen.c (gdk_screen_class_init), (gdk_screen_finalize),
        (update_fontmap_resolution), (gdk_screen_set_resolution):  Add new
        function _gdk_screen_get_font_map() and have one fontmap per screen,
        with the correct resolution set on it.

        * gdk/gdkpango.c (gdk_pango_context_get_for_screen): Use
        _gdk_screen_get_font_map() instead of setting resolution on the
        PangoCairoContext.  (#342529)
2006-05-22 17:08:13 +00:00
Matthias Clasen
58aa5c5e8f gdk_color_parse returns boolean, not int. (#342569, Masatake Yamato)
2006-05-22  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcolor.h: gdk_color_parse returns boolean, not int.
	(#342569, Masatake Yamato)
2006-05-22 12:58:00 +00:00
Matthias Clasen
4c01fbf79c Remove _gdk_x11_screen_request_cm_notification
2006-05-22  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkscreen-x11.c: Remove _gdk_x11_screen_request_cm_notification

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Directly call
	gdk_display_request_selection_notification.

	* gdk/x11/gdkdisplay-x11.c: Several cleanups.
2006-05-22 04:11:42 +00:00
Behdad Esfahbod
f3b986724c Add new function _gdk_screen_get_font_map() and have one fontmap per
2006-05-21  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkinternals.h:
        * gdk/gdkscreen.c (gdk_screen_class_init), (gdk_screen_finalize),
        (update_fontmap_resolution), (gdk_screen_set_resolution):  Add new
        function _gdk_screen_get_font_map() and have one fontmap per screen,
        with the correct resolution set on it.

        * gdk/gdkpango.c (gdk_pango_context_get_for_screen): Use
        _gdk_screen_get_font_map() instead of setting resolution on the
        PangoCairoContext.  (#342529)
2006-05-22 04:04:51 +00:00
Matthias Clasen
0b98adf31a Always set protocol. (#342003, Tommi Komulainen)
2006-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display):
	Always set protocol.  (#342003, Tommi Komulainen)
2006-05-18 18:13:27 +00:00
Michael David Emmel
bc0f858deb Fixed bug 342091 2006-05-18 07:46:06 +00:00
Søren Sandmann
6cb19cf3ad gtk/gtklayout.c (gtk_layout_realize), gtk/gtkiconview.c
Mon May 15 15:12:05 2006  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtklayout.c (gtk_layout_realize),
	* gtk/gtkiconview.c (gtk_icon_view_realize),
	* gtk/gtktreeview.c (gtk_tree_view_realize): Set the background of
	the clip windows to NULL, since they are generally invisible and
	don't have EXPOSURE set, which means they temp-unvlicker code
	doesn't apply to them.

	* gdk/x11/gdkgeometry-x11.c (_gdk_window_move_resize_child): Unset
	the background of the parent window during resizing. Invalidate
	the uncoered area of the parent window. Bug 341332.
2006-05-15 19:17:30 +00:00
Richard Hult
4080181c45 Remove obsolete comment. (poll_func): Remove assert and add a comment on
2006-05-15  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (_gdk_events_init): Remove obsolete
	comment.
	(poll_func): Remove assert and add a comment on how to fix properly.
	(gdk_events_pending): Implement.
2006-05-15 19:01:57 +00:00
Matthias Clasen
f22387f042 Remove extraneous ; 2006-05-14 03:58:06 +00:00
Matthias Clasen
181c53885c Regenerated from Xorg 7.1 keysyms.h, using gdkkeysyms-update.pl.
2006-05-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeysyms.h: Regenerated from Xorg 7.1 keysyms.h, using
	gdkkeysyms-update.pl.

	* gdk/gdkkeysyms-update.pl: Script to sync gdkkeysyms.h
	with Xorg.  (#321896, Simos Xenitellis)

	* gdk/Makefile.am (EXTRA_DIST): Add gdkkeysyms-update.pl
2006-05-11 17:15:40 +00:00
Matthias Clasen
963bc7346c Consistently use lowercase in hex numbers.
2006-05-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeysyms.h: Consistently use lowercase in hex numbers.
2006-05-11 17:07:15 +00:00
Tor Lillqvist
6a652781ac Look at both GDK_SCROLL_MASK and GDK_BUTTON_PRESS_MASK. (#139628)
2006-05-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (doesnt_want_scroll): Look at both
	GDK_SCROLL_MASK and GDK_BUTTON_PRESS_MASK. (#139628)
2006-05-09 15:54:22 +00:00
Matthias Clasen
8db728f953 fix docs 2006-05-07 03:28:22 +00:00
Michael David Emmel
0a55ddda90 Removed DIKI_ALTGR 2006-05-04 23:00:10 +00:00
Matthias Clasen
89b5cb6480 Make symbol list mstch reality.
2006-05-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkfilesystem.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkprintbackend.h:
	* gtk/gtkrecentchooserdefault.c:
	* gtk/gtkrecentchooserdefault.h:
	* gtk/paper_names_offsets.c: Make symbol list mstch reality.

	* gtk/Makefile.am: Fix a typo.

	* gdk/x11/Makefile.am (EXTRA_DIST): Add gdksettings.c
2006-05-04 13:36:30 +00:00
Matthias Clasen
964a638291 Add missing files. (#340533, Ludovic Rousseau)
2006-05-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/quartz/Makefile.am (libgdk_quartz_la_SOURCES): Add
	missing files.  (#340533, Ludovic Rousseau)
2006-05-03 17:59:39 +00:00
Michael David Emmel
47f6017e1a Removed subtracting one from all clips 2006-04-30 17:19:38 +00:00
Behdad Esfahbod
543f6cbbe6 Cast to double before dividing by PANGO_SCALE. (#334582)
2006-04-27  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkpango.c (gdk_pango_renderer_draw_glyphs): Cast to double
        before dividing by PANGO_SCALE. (#334582)
2006-04-28 07:02:04 +00:00
Matthias Clasen
059292a765 fix build without xfixes 2006-04-27 05:04:49 +00:00
Matthias Clasen
dfe415b3e3 Add gdk_screen_is_composited 2006-04-25 16:45:22 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
34f4da23f2 Documentation fixes.
* gdk/gdkregion-generic.c: Documentation fixes.

	* gdk/directfb/gdkmain-directfb.c: Make the comment not look like
	a doc comment.
2006-04-24 18:23:55 +00:00
Alexander Larsson
27f746fbd0 Merge the gtk-printing branch. For more detailed ChangeLog entries, see
2006-04-21  Alexander Larsson  <alexl@redhat.com>

        Merge the gtk-printing branch.
	For more detailed ChangeLog entries, see the branch.

	* .cvsignore:
	* Makefile.am:
	* configure.in:
	* docs/tools/widgets.c:
	* gtk+-unix-print-2.0.pc.in:
	* gtk/Makefile.am:
	* gtk/gen-paper-names.c:
	* gtk/gtk.h:
	* gtk/gtk.symbols:
	* gtk/gtkenums.h:
	* gtk/gtkiconfactory.c:
	* gtk/gtkmarshalers.list:
	* gtk/gtkpagesetup.[ch]:
	* gtk/gtkpagesetupunixdialog.[ch]:
	* gtk/gtkpapersize.[ch]:
	* gtk/gtkprint-win32.[ch]:
	* gtk/gtkprintbackend.[ch]:
	* gtk/gtkprintcontext.[ch]:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.[ch]:
	* gtk/gtkprinteroption.[ch]:
	* gtk/gtkprinteroptionset.[ch]:
	* gtk/gtkprinteroptionwidget.[ch]:
	* gtk/gtkprintjob.[ch]:
	* gtk/gtkprintoperation-private.h:
	* gtk/gtkprintoperation-unix.c:
	* gtk/gtkprintoperation-win32.c:
	* gtk/gtkprintoperation.[ch]:
	* gtk/gtkprintsettings.[ch]:
	* gtk/gtkprintunixdialog.[ch]:
	* gtk/paper_names.c:
	* gtk/paper_names_offsets.c:
	Platform independent printing API and implementations
	for unix and windows.

	* gtk/gtkstock.h:
	* gtk/stock-icons/24/gtk-orientation-landscape.png:
	* gtk/stock-icons/24/gtk-orientation-portrait.png:
	* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
	Add stock icons for page orientation.

	* modules/Makefile.am:
	* modules/printbackends/Makefile.am:
	* modules/printbackends/cups/Makefile.am:
	* modules/printbackends/cups/gtkcupsutils.[ch]:
	* modules/printbackends/cups/gtkprintbackendcups.[ch]:
	* modules/printbackends/cups/gtkprintercups.[ch]:

	Cups printing backend for unix.

	* modules/printbackends/lpr/Makefile.am:
	* modules/printbackends/lpr/gtkprintbackendlpr.[ch]:
	lpr printing backend for unix.

	* modules/printbackends/pdf/Makefile.am:
	* modules/printbackends/pdf/gtkprintbackendpdf.[ch]:
	print-to-pdf printing backend for unix.

	* tests/.cvsignore:
	* tests/Makefile.am:
	* tests/print-editor.c:
	Test application for printing.

	* gdk/gdk.symbols:
	* gdk/win32/gdkevents-win32.c:
	* gdk/win32/gdkwin32.h:
	Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the
	mainloop while displaying a win32 common dialog.

	* gdk/directfb/Makefile.am:
	Whitespace cleanup.
2006-04-21 15:09:32 +00:00
Michael David Emmel
1787ca5e2a fixed off by one error in clip patch from (#330824) 2006-04-20 02:50:21 +00:00
Tor Lillqvist
8ae3fade37 Map VK_NUMPAD[0-9] to GDK_KP_[0-9]. (#337562)
2006-04-19  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkkeys-win32.c (handle_special): Map VK_NUMPAD[0-9]
	to GDK_KP_[0-9]. (#337562)
2006-04-19 09:42:06 +00:00
Richard Hult
7deea61cbf Add check for source being a window.
2006-04-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkdrawable-quartz.c: (gdk_quartz_draw_drawable): Add check
	for source being a window.

	* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_get_pointer):
	Don't assert on window not being the root window.
2006-04-16 20:13:13 +00:00
Richard Hult
5dc0919ed6 Remove leading cairo/ in include.
2006-04-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkdrawable-quartz.c: Remove leading cairo/ in include.
2006-04-16 19:33:11 +00:00
Matthias Clasen
dfc29f83ae Avoid a possible array overrun. (Coverity)
2006-04-16  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_initial_hints ): Avoid a
        possible array overrun.  (Coverity)
2006-04-16 05:05:49 +00:00
Anders Carlsson
a62b7cdc9a Take grabs into account.
2006-04-13  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (synthesize_enter_event):
        (synthesize_leave_event):
        (synthesize_crossing_events):
        Take grabs into account.

        (find_window_for_event):
        Only return grabbed window when owner_events is FALSE.
2006-04-13 08:51:33 +00:00
Matthias Clasen
10e0b3c8e1 Fix another Coverity bug 2006-04-12 20:43:52 +00:00
Matthias Clasen
93c2bc828e Make this work for list == NULL. (Coverity)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkselection-x11.c (make_list): Make this work
	for list == NULL.  (Coverity)
2006-04-12 18:38:40 +00:00
Matthias Clasen
6d66ce2fc3 Rearrange the code a bit.
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_entries_for_keycode):
	Rearrange the code a bit.
2006-04-12 17:57:30 +00:00
Anders Carlsson
2ba96a7150 Handle page up and page down.
2006-04-12  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkkeys-quartz.c:
        Handle page up and page down.
2006-04-12 09:35:34 +00:00
Anders Carlsson
3d1e71073e Don't flush if we're inside a begin_paint/end_paint pair.
2006-04-12  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkdrawable-quartz.c:
        (_gdk_quartz_drawable_release_context):
        Don't flush if we're inside a begin_paint/end_paint pair.

        * gdk/quartz/gdkwindow-quartz.c:
        (gdk_window_impl_quartz_end_paint):
        Free clip region here.
2006-04-12 08:23:01 +00:00
Matthias Clasen
4906bd0fad Fix another Coverity bug 2006-04-12 04:20:28 +00:00
Anders Carlsson
1e3d722024 Have GdkWindowImplQuartz implement GdkPaintable.
2006-04-11  Anders Carlsson  <andersca@mac.imendio.com>

        * gdk/quartz/GdkQuartzView.c:
        (-[GdkQuartzView drawRect:]):
        * gdk/quartz/gdkdrawable-quartz.c:
        (gdk_quartz_ref_cairo_surface):
        (_gdk_quartz_drawable_get_context):
        (_gdk_quartz_drawable_release_context):
        * gdk/quartz/gdkwindow-quartz.c:
        (gdk_window_impl_quartz_finalize):
        (gdk_window_impl_quartz_class_init):
        (gdk_window_impl_quartz_begin_paint_region):
        (gdk_window_impl_quartz_end_paint):
        (gdk_window_impl_quartz_invalidate_maybe_recurse):
        (gdk_window_impl_quartz_process_updates):
        (gdk_window_impl_quartz_paintable_init):
        (_gdk_window_impl_quartz_get_type):
        * gdk/quartz/gdkwindow-quartz.h:
        Have GdkWindowImplQuartz implement GdkPaintable.
2006-04-10 23:17:26 +00:00
Anders Carlsson
47257b075b Add new GdkPaintable interface which implementation objects can implement
2006-04-11  Anders Carlsson  <andersca@imendio.com>

        * gdk/gdkinternals.h:
        * gdk/gdkwindow.c:
        (_gdk_paintable_get_type):
        (gdk_window_begin_paint_region):
        (gdk_window_end_paint):
        (gdk_window_process_updates):
        (gdk_window_invalidate_maybe_recurse):
        Add new GdkPaintable interface which implementation objects can
        implement in order to override gdk painting functions.
2006-04-10 19:43:08 +00:00
Tor Lillqvist
886ca74ca2 Correct the appearance of non-square icons and cursors: pad them to square
2006-04-06  Tor Lillqvist  <tml@novell.com>

	Correct the appearance of non-square icons and cursors: pad them
	to square so that Windows won't stretch them.

	* gdk/win32/gdkcursor-win32.c (create_alpha_bitmap)
	(create_color_bitmap): Always create square bitmaps, take only
	side length as argument.
	(pixbuf_to_hbitmaps_alpha_winxp, pixbuf_to_hbitmaps_normal):
	Corresponding changes.
2006-04-06 10:34:15 +00:00
Søren Sandmann
3797d5a34e Add "_private" to make it build.
Tue Apr  4 12:25:36 2006  Søren Sandmann  <sandmann@redhat.com>

        * gdk/x11/gdkimage-x11.c (gdk_image_class_init): Add "_private" to
        make it build.
2006-04-04 17:51:15 +00:00
Matthias Clasen
10f0736ac7 Use G_DEFINE_TYPE.
2006-04-04  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.c:
	* gdk/gdkdisplaymanager.c:
	* gdk/gdkdraw.c:
	* gdk/gdkkeys.c:
	* gdk/gdkpixmap.c:
	* gdk/gdkscreen.c:
	* gdk/gdkwindow.c:
	* gdk/x11/gdkcolor-x11.c:
	* gdk/x11/gdkdisplay-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkdrawable-x11.c:
	* gdk/x11/gdkgc-x11.c:
	* gdk/x11/gdkimage-x11.c:
	* gdk/x11/gdkinput.c:
	* gdk/x11/gdkpixmap-x11.c:
	* gdk/x11/gdkscreen-x11.c:
	* gdk/x11/gdkwindow-x11.c: Use G_DEFINE_TYPE.

	* gdk/x11/gdkcolor-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkimage-x11.c: Use instance private data.
2006-04-04 14:02:03 +00:00
Matthias Clasen
9c0f0bb451 Small savings 2006-04-04 04:14:17 +00:00
Matthias Clasen
9713b368b2 Here too.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c: Here too.
2006-04-03 20:38:09 +00:00
Matthias Clasen
aff3329de1 Make _gdk_windowing_args const.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkinternals.h:
	* gdk/x11/gdkmain-x11.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/directfb/gdkdisplay-directfb.c:
	* gdk/quartz/gdkmain-quartz.c: Make _gdk_windowing_args const.
2006-04-03 20:36:52 +00:00
Matthias Clasen
ac180cb0e4 Include gdksreen.h (#337032, Kazuki IWAMOTO)
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/win32/gdkpixmap-win32.c: Include gdksreen.h  (#337032,
	 Kazuki IWAMOTO)
2006-04-03 18:12:04 +00:00
Matthias Clasen
039eb1ebf9 Reword docs to help gtk-doc.
2006-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c (gdk_region_get_clipbox): Reword
	docs to help gtk-doc.
2006-03-30 20:56:03 +00:00
Michael David Emmel
cfd72f5cd6 Added gdk_pixmap_foreign_new_for_screen 2006-03-30 16:14:18 +00:00
Matthias Clasen
88fe228053 Make it compile 2006-03-30 04:58:15 +00:00
Matthias Clasen
7e6f1345a9 New function to allow wrapping a native pixmap without a server roundtrip.
2006-03-29  Matthias Clasen <mclasen@redhat.com>

        * gdk/gdk.symbols:
        * gdk/gdkpixmap.h:
        * gdk/win32/gdkpixmap-win32.c:
        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new_for_screen):
        New function to allow wrapping a native pixmap without
        a server roundtrip.  (#334954, David Baron)
2006-03-30 04:08:51 +00:00
Richard Hult
31f45bf9aa Add missing CLIPBOARD atom.
2006-03-29  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkproperty-quartz.c: Add missing CLIPBOARD atom.
2006-03-29 20:34:33 +00:00
Anders Carlsson
856ee02fe4 Make the poll func work with real file descriptors. We do this by creating
2006-03-27  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (select_thread_func):
        (got_fd_activity):
        (poll_func):
        (gdk_event_translate):
        Make the poll func work with real file descriptors.
        We do this by creating a thread which calls poll and then
        signals the main thread using a run loop source.

        * gtk/gtkclipboard-quartz.c:
        (-[GtkClipboardOwner pasteboard:provideDataForType:]):
        Remove debugging output
2006-03-27 18:46:38 +00:00
Richard Hult
ce823f5b28 Add more stubs.
2006-03-27  Richard Hult  <richard@imendio.com>

	* gdk/quartz: Add more stubs.
2006-03-27 10:47:29 +00:00
Michael Natterer
d4d65217b7 removing trailing \ fixes the build.
2006-03-21  Michael Natterer  <mitch@imendio.com>

	* gdk/quartz/Makefile.am: removing trailing \ fixes the build.
2006-03-21 11:52:28 +00:00
Anders Carlsson
03c29e1123 Implement gdk_window_scroll.
2006-03-21  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkgeometry-quartz.c:
        (gdk_window_scroll):
        Implement gdk_window_scroll.
2006-03-21 09:36:46 +00:00
Anders Carlsson
6b1510bf23 Add the GDK part of the DND implementation.
2006-03-21  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/GdkQuartzWindow.c:
        (drag_operation_to_drag_action):
        (drag_action_to_drag_operation):
        (update_context_from_dragging_info):
        (-[GdkQuartzWindow draggingEntered:]):
        (-[GdkQuartzWindow draggingEnded:]):
        (-[GdkQuartzWindow draggingExited:]):
        (-[GdkQuartzWindow draggingUpdated:]):
        (-[GdkQuartzWindow performDragOperation:]):
        (-[GdkQuartzWindow wantsPeriodicDraggingUpdates]):
        (-[GdkQuartzWindow draggedImage:endedAt:operation:]):
        * gdk/quartz/gdkdnd-quartz.c:
        (gdk_drag_context_finalize):
        (gdk_drag_context_init):
        (gdk_drag_context_class_init):
        (gdk_drag_begin):
        (gdk_drag_status):
        Add the GDK part of the DND implementation.

        * gdk/quartz/Makefile.am:
        Add some missing headers.

        * gdk/quartz/gdkdrawable-quartz.h:
        * gdk/quartz/gdkprivate-quartz.h:
        * gdk/quartz/gdkquartz.h:
        * gdk/quartz/gdkwindow-quartz.c:
        (gdk_quartz_window_get_nsview):
        New function, for use by the GTK part of the DND implementation
2006-03-21 08:02:17 +00:00
Anders Carlsson
ac3643d8f3 Offset coordinates by 0.5 pixels to get consistant results for both image
2006-03-21  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkdrawable-quartz.c:
        (gdk_quartz_ref_cairo_surface):
        (gdk_quartz_draw_rectangle):
        (gdk_quartz_draw_arc):
        (gdk_quartz_draw_polygon):
        (gdk_quartz_draw_drawable):
        (gdk_quartz_draw_segments):
        (gdk_quartz_draw_lines):
        (gdk_quartz_draw_pixbuf):
        (gdk_quartz_draw_image):
        (_gdk_quartz_drawable_get_context):
        * gdk/quartz/gdkdrawable-quartz.h:
        Offset coordinates by 0.5 pixels to get consistant results for both
        image contexts and screen contexts.
2006-03-21 07:49:05 +00:00
Anders Carlsson
7fe53a99bb ]): Synthesize GDK_CONFIGURE events when the window position changes.
2006-03-21  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/GdkQuartzWindow.c
        ([GdkQuartzWindow -windowDidMove:]): Synthesize GDK_CONFIGURE events
        when the window position changes.
2006-03-21 07:36:54 +00:00
Behdad Esfahbod
3f4944b923 Added checksettings. 2006-03-15 07:59:09 +00:00
Tor Lillqvist
23025393a6 Use Polygon() for outlined polygons, too. Same idea as in
2006-03-11  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (draw_polygon): Use Polygon() for
	outlined polygons, too. Same idea as in draw_rectangle(): Set pen
	to NULL_PEN if drawing a filled polygon, set brush to HOLLOW_BRUSH
	if drawing a polygon outline. (#332662)
	(gdk_win32_draw_polygon): Corresponding simplification: no need to
	add an extra final copy of the starting point.
2006-03-11 20:34:37 +00:00
Michael Natterer
5afb4f0f11 gdk/gdkscreen.h gdk/x11/gdkscreen-x11.c added
2006-03-08  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkscreen.h
	* gdk/x11/gdkscreen-x11.c
	* gdk/gdk.symbols: added gdk_screen_get_active_window() and
	gdk_screen_get_window_stack() (patch from maemo-gtk).
	Fixes bug #320881.

	* gdk/directfb/gdkscreen-directfb.c
	* gdk/quartz/gdkscreen-quartz.c
	* gdk/win32/gdkscreen-win32.c: added the functions as stubs.
2006-03-08 17:02:34 +00:00
Matthias Clasen
321428fee7 Adjust the handling of min values for the x and y axes of extended input
2006-03-04  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkinput-x11 (gdk_input_translate_coordinates):
	Adjust the handling of min values for the x and y axes of
	extended input devices  (#324562, #142536, Denis Auroux and
	Robert Ögren)
2006-03-04 05:26:29 +00:00
Michael Natterer
7324be3c3a map "gtk-touchscreen-mode" to the "Gtk/TouchscreenMode" XSettings
2006-02-27  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdksettings.c: map "gtk-touchscreen-mode" to the
	"Gtk/TouchscreenMode" XSettings property, remove trailing
	whitespace.

	* gdk/x11/checksettings.c: #include <string.h> and sprinkled some
	newlines.
2006-02-27 14:08:06 +00:00
Tim Janik
e33012b8e0 moved and renamed the gdk_settings_names and gdk_settings_map.
Mon Feb 27 14:52:50 2006  Tim Janik  <timj@imendio.com>

        * gdkevents-x11.c:
        * gdksettings.c: moved and renamed the gdk_settings_names and
        gdk_settings_map.

        * gdk/x11/checksettings.c: test program for the gdk_settings_map array.

        * gdk/x11/Makefile.am: run checksettings as part of make check.
2006-02-27 13:56:30 +00:00
Michael David Emmel
cee36ddec5 Removed old build instructions 2006-02-26 18:24:53 +00:00
PST 2006 Michael Emmel
ce714a8cd9 *gdk/directfb/gdkdisplay-directfb.c *gdk/directfb/gdkwindow-directfb.c
Sat Feb 25 10:35:23 PST 2006  Michael Emmel  <mike.emmel@gmail.com>
    *gdk/directfb/gdkdisplay-directfb.c
    *gdk/directfb/gdkwindow-directfb.c
    Added stubs for shape window functions to fix compile problems
2006-02-25 18:37:53 +00:00
Tim Janik
a941deb67f remove unconditional warnings about missing X locale support. Gdk properly
Thu Feb 23 13:28:21 2006  Tim Janik  <timj@imendio.com>

        * gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale): remove unconditional
        warnings about missing X locale support. Gdk properly handles this
        situation anyway.
2006-02-24 12:28:33 +00:00
Anders Carlsson
5dcae734e5 Add these from the win32 backend.
2006-02-21  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkselection-quartz.c:
        (make_list):
        (gdk_text_property_to_utf8_list_for_display):
        Add these from the win32 backend.
2006-02-21 08:32:28 +00:00
Matthias Clasen
1bb487a2c7 Obtain the background color from the gc when it is needed. (#331820)
2006-02-20  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (_gdk_gc_update_context): Obtain the
	background color from the gc when it is needed.  (#331820)
2006-02-20 17:57:09 +00:00
Matthias Clasen
0f0845a6b6 Forgotten file 2006-02-20 17:20:09 +00:00
Matthias Clasen
3c9432eeb6 Add a gc_changed argument, and avoid setting the clip region if the gc has
2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (_gdk_gc_update_context): Add a gc_changed
	argument, and avoid setting the clip region if the gc
	has not changed.

	* gdk/gdkgc.c: Update all callers.

	* gdk/gdkpango.c (get_cairo_context): Avoid updating the
	context if nothing changed.
2006-02-20 17:17:09 +00:00
Anders Carlsson
ba8e91b9fc Add stubs for input shape functions.
2006-02-20  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkdisplay-quartz.c:
        (gdk_display_supports_shapes):
        (gdk_display_supports_input_shapes):
        * gdk/quartz/gdkwindow-quartz.c:
        (gdk_display_warp_pointer):
        (gdk_window_input_shape_combine_mask):
        (gdk_window_input_shape_combine_region):
        (gdk_window_set_child_input_shapes):
        (gdk_window_set_accept_focus):
        (gdk_window_merge_child_input_shapes):
        Add stubs for input shape functions.
2006-02-20 11:57:12 +00:00
Anders Carlsson
cae6c15d65 Fix typo so ctrl gets passed on to the gdk event.
2006-02-20  Anders Carlsson  <andersca@mac.com>

        * gdk/quartz/gdkevents-quartz.c:
        (get_keyboard_modifiers_from_nsevent):
        Fix typo so ctrl gets passed on to the gdk event.

        * gdk/quartz/gdkproperty-quartz.c:
        (gdk_atom_name):
        g_strdup the atom name.
2006-02-20 11:07:25 +00:00
Tor Lillqvist
3cb8a43a25 New function, return TRUE. (gdk_display_supports_input_shapes): New
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_supports_shapes):
	New function, return TRUE.
	(gdk_display_supports_input_shapes): New function, return FALSE.
2006-02-20 10:10:27 +00:00
Tor Lillqvist
f251cf42fd New function. Factor out code from gdk_window_shape_combine_mask().
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (do_shape_combine_region): New
	function. Factor out code from gdk_window_shape_combine_mask().
	(gdk_window_shape_combine_region): Actually do something. Convert
	region to a HRGN and call do_shape_combine_region().
	(gdk_window_input_shape_combine_mask)
	(gdk_window_input_shape_combine_region)
	(gdk_window_set_child_input_shapes)
	(gdk_window_merge_child_input_shapes): New functions, dummy
	implementations.
2006-02-20 10:08:37 +00:00
Michael Natterer
9b9a5bcee6 adding boolean have_shapes and have_input_shapes members fixes the build.
2006-02-20  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): adding boolean
	have_shapes and have_input_shapes members fixes the build.
2006-02-20 09:49:49 +00:00
Tor Lillqvist
d9d1a36c59 Replace all calls to g_strcasecmp() with g_ascii_strcasecmp().
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkfont-win32.c: Replace all calls to g_strcasecmp()
	with g_ascii_strcasecmp().
2006-02-20 08:52:19 +00:00
Matthias Clasen
1ad93a683b Support input shapes: (#331070)
2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	Support input shapes:  (#331070)

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_shapes)
	(gdk_display_supports_input_shapes): Functions to determine
	if a display supports shaped windows or input shapes.

	* gdk/x11/gdkwindow-x11.c (gdk_window_input_shape_combine_region):
	(gdk_window_input_shape_combine_mask):
	(gdk_window_set_child_input_shapes):
	(gdk_window_merge_child_input_shapes): Input shape versions
	of the window shape API.

	* gtk/gtk.symbols:
	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c (gtk_widget_input_shape_combine_mask):
	New function to set an input shape on a widget.
2006-02-20 01:36:50 +00:00
Matthias Clasen
ba6a8de664 Be robust and reject rectangles with negative width or height. (#331467,
2006-02-17  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkregion-generic.c (gdk_region_union_with_rect):
        Be robust and reject rectangles with negative width or
        height.  (#331467, Benjamin Berg)
2006-02-17 15:41:27 +00:00
Sven Neumann
4cbef86980 added .cvsignore file to shut up CVS 2006-02-09 11:39:48 +00:00
Tor Lillqvist
a7e8b3521c If we don't know where we went, and have generated a leave event, set
2006-02-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSELEAVE>: If we don't know where we went, and have
	generated a leave event, set current_window to the root
	window. This assures we will generate proper enter and leave
	events for popup windows. (#325521)
2006-02-09 05:49:55 +00:00
John Ehresman
e847ace84b gdk/win32/gdkevents-win32.c (gdk_event_translate) <WM_MOUSEACTIVATE> Call
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSEACTIVATE>
	* gdk/win32/gdkwindow-win32.c (show_window_internal)
	(gdk_window_raise): Call SetWindowPos() instead of
	SetForegroundWindow() or BringWindowToTop() if the window
	shouldn't accept focus. (#327375)
2006-02-09 03:20:56 +00:00
John Ehresman
c502c9aeab Let gdk_window_set_decorations() take precedence over anything derived
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkwindow-win32.c: Let gdk_window_set_decorations()
	take precedence over anything derived from hints. Restructure
	related code and logic, add some new helper functions. (#327217)
2006-02-09 02:58:45 +00:00
Tor Lillqvist
746a5c36a5 Consistenly use assign_object() when assigning GdkWindow pointers so that
2006-02-08  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab)
	(gdk_display_pointer_ungrab, gdk_keyboard_grab)
	(gdk_display_keyboard_ungrab): Consistenly use assign_object()
	when assigning GdkWindow pointers so that the ref counting doesn't
	get off whack.

	(handle_stuff_while_moving_or_resizing): Don't use deprecated API.

	(gdk_event_translate) <WM_MOUSEMOVE>: When the pointer is grabbed
	with owner_events FALSE, generate enter and leave events only for
	the grab window. (#321054)
2006-02-08 17:32:50 +00:00
Sven Neumann
859e395037 updated mine and Dok's email address.
2006-02-07  Sven Neumann  <sven@gimp.org>

	* gdk/directfb/AUTHORS: updated mine and Dok's email address.
2006-02-07 11:58:49 +00:00
Dom Lachowicz
67ac65e146 Bug #330022 Wrong pixel values are computed when color = 0xFF and alpha =
* gdk/gdkcairo.c (gdk_cairo_set_source_pixbuf): Bug #330022
	Wrong pixel values are computed when color = 0xFF and alpha = 0xFF
2006-02-05 20:34:43 +00:00
Michael David Emmel
f94921838e Added new directfb backend 2006-02-05 04:04:29 +00:00
Federico Mena Quintero
9bfabba034 Work around https://bugs.freedesktop.org/show_bug.cgi?id=4320, which used
2006-02-03  Federico Mena Quintero  <federico@ximian.com>

	Work around https://bugs.freedesktop.org/show_bug.cgi?id=4320,
	which used to be our own
	http://bugzilla.gnome.org/show_bug.cgi?id=314616.  If one uses a
	pixmap for a pattern in Cairo, and sets the pattern to
	CAIRO_EXTEND_REPEAT; and if the destination surface is also a
	pixmap, Cairo does a slow copy instead of using XCopyArea().  So,
	we use the same code that we used in GTK+ 2.6 (pre-cairo), by
	filling the double-buffer pixmap with a tiled GC and
	XFillRectangle().

	* gdk/gdkwindow.c (BackingRectMethod): New structure with a
	cairo_t and a GdkGC field.  Depending on which of these fields
	gets filled in, we'll use Cairo or GDK to clear the double-buffer
	pixmap when painting a window.
	(setup_backing_rect_method): Fill a BackingRectMethod as
	appropriate, depending on the window's configuration and our
	knowledge of whether Cairo is fast or slow when doing repeating
	patterns.
	(gdk_window_clear_backing_rect): Call
	setup_backing_rect_method().  Depending on what it returns, use
	Cairo to clear the double-buffer pixmap, or plain GDK.
2006-02-03 21:17:34 +00:00
Matthias Clasen
afab67f99a Make drops on the root window work again. (#145243, Andrew S. Dixon)
2006-02-02  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display):
	Make drops on the root window work again.  (#145243, Andrew S. Dixon)
2006-02-02 20:51:49 +00:00
Behdad Esfahbod
6a66c972ca If major.minor of required and available glib versions are the same, add
2006-01-28  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in: If major.minor of required and available glib versions
        are the same, add -DG_DISABLE_DEPRECATED to GLIB_CFLAGS. (bug #328617)

        * */Makefile.am: Remove hardcoded -DG_DISABLE_DEPRECATED.
2006-01-29 04:00:45 +00:00
Matthias Clasen
2ec7ee28b8 Only set the cursor size if it is != 0.
2006-01-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme): Only
	set the cursor size if it is != 0.

	* gtk/gtksettings.c (gtk_settings_class_init): Change the default value
	of gtk-cursor-theme-size to 0, meaning "use default".
2006-01-25 15:41:40 +00:00
Matthias Clasen
73153b42e8 Use an unused high bit in the XID to mark fonts in the global xid hash
2006-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkprivate-x11.h (XID_FONT_BIT):
	* gdk/x11/gdkfont-x11.c:
	* gdk/x11/gdkxid.c: Use an unused high bit in the
	XID to mark fonts in the global xid hash table.

	* gdk/x11/gdkcursor-x11.c (update_cursor): Skip fonts
	when iterating over the xid hash table, since calling
	GDK_IS_WINDOW () on an GdkFont can cause a segfault.
	(#327751, Ryan Lortie)
2006-01-20 04:35:24 +00:00
Anders Carlsson
4b705d23d2 Implement these functions. (#327228, Thomas Broyer).
2006-01-18  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (get_mm_from_pixels):
        (gdk_screen_get_width_mm):
        (gdk_screen_get_height_mm):
        Implement these functions.
        (#327228, Thomas Broyer).
2006-01-18 10:06:00 +00:00
Anders Carlsson
580d76a4f9 Implement these functions. (#327226, Thomas Broyer)
2006-01-18  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkdrawable-quartz.c:
        (gdk_quartz_draw_polygon):
        (gdk_quartz_draw_lines):
	Implement these functions.
	(#327226, Thomas Broyer)
2006-01-18 09:47:56 +00:00
Anders Carlsson
617595dff2 Support non-MacRoman keyboard layouts. (#322585, Wolfgang Thaller)
2006-01-18  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkkeys-quartz.c:
        (maybe_update_keymap):
	    Support non-MacRoman keyboard layouts.
	    (#322585, Wolfgang Thaller)
2006-01-18 09:30:00 +00:00
Anders Carlsson
6ebd463287 Make the process a foreground application. (#322481, Wolfgang Thaller)
2006-01-18  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkmain-quartz.c:
        (_gdk_windowing_init):
        Make the process a foreground application.
        (#322481, Wolfgang Thaller)
2006-01-18 09:17:39 +00:00
Anders Carlsson
be820c5dc4 Fix ChangeLog entry 2006-01-16 11:11:20 +00:00
Anders Carlsson
4afc4d61c6 Implement keyboard grabs.
2006-01-16  Anders Carlsson  <andersca@mac.com>

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkevents-quartz.c:
        (gdk_keyboard_grab):
        (gdk_display_keyboard_ungrab):
        (gdk_keyboard_grab_info_libgtk_only):
        (find_window_for_event):
        Implement keyboard grabs.

        (_gdk_quartz_send_map_events):
        * gdk/quartz/gdkmain-quartz.c:
        * gdk/quartz/gdkprivate-quartz.h:
        New function that synthesizes map events.

        * gdk/quartz/gdkwindow-quartz.c:
        (_gdk_windowing_window_init):
        The root window is always visible.

        (all_parents_shown):
        (show_window_internal):
        Send map events.

        (gdk_window_hide):
        Ungrab keyboard and pointer
2006-01-16 10:52:40 +00:00
Matthias Clasen
fcfefedd44 Make this work on more platforms.
2006-01-13  Matthias Clasen  <mclasen@redhat.com>

	* */abicheck.sh: Make this work on more platforms.
2006-01-14 04:45:22 +00:00
Michael Natterer
b060715deb connect to the display's "closed" signal and free the cached scratch
2006-01-12  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkimage.c (scratch_image_info_for_depth): connect to the
	display's "closed" signal and free the cached scratch images upon
	display closing (bug #85715).
2006-01-12 13:50:51 +00:00
Matthias Clasen
5453f11464 Clean up properly if the grab fails. (finish_drag): Don't leak a reference
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (create_moveresize_window): Clean
	up properly if the grab fails.
	(finish_drag): Don't leak a reference to moveresize_window
	here.
2006-01-11 14:54:05 +00:00
Matthias Clasen
29b890f951 Fix string offsets.
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c: Fix string offsets.
2006-01-11 06:26:30 +00:00
Matthias Clasen
f35d4e1e47 Allow falling back to another icon theme before hicolor. (#325546, Rodney
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	Allow falling back to another icon theme before
	hicolor.   (#325546, Rodney Dawes)

	* gtk/gtksettings.c: Add a gtk-fallback-icon-theme setting.

	* gdk/x11/gdkevents-x11.c: Map it to the XSetting Net/FallbackIconTheme.

	* gtk/gtkicontheme.c: Consult the fallback icon theme before
	looking in hicolor.
2006-01-11 06:20:17 +00:00
Michael Natterer
65c8f103d6 disconnect from the right object ("closed" is emitted by the display, not
2006-01-10  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkpango.c (on_renderer_display_closed): disconnect from the
	right object ("closed" is emitted by the display, not the screen).
	(bug #85715)
2006-01-10 16:47:37 +00:00
Anders Carlsson
c18f7da40d Implement local-only atoms.
2006-01-10  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkproperty-quartz.c:
        (ensure_atom_tables):
        (intern_atom_internal):
        (gdk_atom_intern):
        (gdk_atom_intern_static_string):
        (gdk_atom_name):
        Implement local-only atoms.
2006-01-10 16:38:26 +00:00
Matthias Clasen
4483d48b75 Correct a warning. (#326341, Benoît Carpentier)
2006-01-09  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (gc_get_foreground): Correct a warning.
	(#326341, Benoît Carpentier)
2006-01-10 04:42:18 +00:00
Johan Dahlin
ba9c437d54 Add cvsignore 2006-01-09 19:25:35 +00:00
Matthias Clasen
ea8167d919 Fix this for the single-rectangle case. (#326127, Benjamin Berg)
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c (miRegionCopy): Fix this for the
	single-rectangle case.  (#326127, Benjamin Berg)
	(gdk_region_copy): Use miRegionCopy() here.
2006-01-08 06:11:18 +00:00
Hans Breuer
7b550043d0 also recurse into win32 for ::clean create gtkbuiltincache.h (most code to
2006-01-05  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc : also recurse into win32 for ::clean
	* gtk/makefile.msc.in : create gtkbuiltincache.h (most code
	to simulate links) and file renames
2006-01-05 23:55:08 +00:00
Anders Carlsson
6130996a77 Have these return TRUE
2006-01-02  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/GdkQuartzWindow.c:
        (-[GdkQuartzWindow canBecomeMainWindow]):
        (-[GdkQuartzWindow canBecomeKeyWindow]):
        Have these return TRUE

        * gdk/quartz/gdkevents-quartz.c:
        (pointer_grab_internal):
        Remove FIXME

        (find_child_window_by_point_helper):
        Fix bug in offset calculation

        (find_window_for_event):
        Use grab window toplevel when a grab is in effect

        (gdk_event_translate):
        Don't call _gdk_event_button_generate on mouse up

        * gdk/quartz/gdkgc-quartz.c:
        (_gdk_quartz_gc_new):
        Fix indentation

        * gdk/quartz/gdkwindow-quartz.c:
        (gdk_window_new):
        Make TEMP windows borderless

        (gdk_window_hide):
        Hide window

        (gdk_window_get_origin):
        Implement
2006-01-02 16:34:21 +00:00
Tor Lillqvist
348ffaea19 Make identical to the X11 implementation. (#322264, John Ehresman)
2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_impl_win32_get_visible_region): Make identical to the
	X11 implementation. (#322264, John Ehresman)
2006-01-02 09:32:56 +00:00
Tor Lillqvist
33cb3f8f57 Revert stuff that was accidentally committed. 2006-01-02 00:48:39 +00:00
Tor Lillqvist
53e2c08380 Get the invalidated region from ScrollWindowEx() instead of an incorrect
2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
	invalidated region from ScrollWindowEx() instead of an incorrect
	attempt to calculate it ourselves. Fix by John Ehresman. (#323666)

	* gdkevents-win32.c: Make _gdk_win32_hrgn_to_region() non-static.

	* gdkprivate-win32.h: Declare it.
2006-01-02 00:45:39 +00:00
Matthias Clasen
b19cda7c37 Add gdk_cairo_set_source_pixmap. (#318805, Alexander Larsson)
2005-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkcairo.h:
	* gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap.  (#318805,
	Alexander Larsson)
2005-12-30 07:16:35 +00:00
Matthias Clasen
7f414f6b69 Call gdk_display_manager_set_default_display() to change the default
2005-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplaymanager.c (gdk_display_manager_set_property): Call
	gdk_display_manager_set_default_display() to change the default
	display.  (#153623, Stefan Kost)
2005-12-30 06:32:30 +00:00
Matthias Clasen
1963c67c46 Fix a typo. (gdk_screen_get_setting): Avoid relocations for the settings
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (check_transform): Fix a typo.
	(gdk_screen_get_setting): Avoid relocations for the settings
	map.
2005-12-27 07:57:52 +00:00
Matthias Clasen
3a46c7f11e Fix a typo.
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkevents-x11.c (check_transform): Fix a typo.
2005-12-27 07:39:19 +00:00
Matthias Clasen
86838ffd06 Avoid relocations for the list of standard atoms.
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkproperty-x11.c: Avoid relocations for the list
	of standard atoms.
2005-12-27 07:36:58 +00:00
Matthias Clasen
165b7ad3d3 Precache atoms before calling gdk_window_new().
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms
	before calling gdk_window_new().
2005-12-27 04:38:31 +00:00
Matthias Clasen
8083b8ef6a Inline docs, use g_assert(), avoid extra allocation for rectangular
2005-12-24  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c:
	* gdk/gdkpolyreg-generic.c:
	* gdk/gdkregion.h:
	* gdk/gdkrectangle.c: Inline docs, use g_assert(), avoid
	extra allocation for rectangular regions.
2005-12-24 07:29:00 +00:00
Matthias Clasen
7f00877312 Inline docs.
2005-12-24  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkrectangle.c: Inline docs.
2005-12-24 07:00:47 +00:00
Matthias Clasen
fe0fb8966d Use the slice allocator for regions. Still todo: avoid extra allocations
2005-12-21  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkregion-generic.c: Use the slice allocator
	for regions. Still todo: avoid extra allocations for
	the single-rectangle case.
2005-12-21 21:10:41 +00:00
Matthias Clasen
d126427e67 Another doc update 2005-12-20 05:35:15 +00:00
Matthias Clasen
7fe23c05cf Documentation updates 2005-12-20 05:33:19 +00:00
Matthias Clasen
c7778a8600 Fix an oversight 2005-12-11 04:25:52 +00:00
Matthias Clasen
73696ef8be Don't ignore errors from g_option_context_parse().
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c (gdk_parse_args):
	* gtk/gtkmain.c (gtk_parse_args): Don't ignore errors
	from g_option_context_parse().
2005-12-06 16:44:31 +00:00
Tim Janik
83344dae85 fix missing hash table initialization.
Tue Dec  6 11:37:59 2005  Tim Janik  <timj@gtk.org>

        * gdk/gdkevents.c (gdk_event_new): fix missing hash table
        initialization.
2005-12-06 10:40:09 +00:00
Michael Natterer
40894e9a49 map the new GtkSettings properties "timeout-initial", "timeout-repeat",
2005-12-05  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c: map the new GtkSettings properties
	"timeout-initial", "timeout-repeat", "color-scheme" and
	"enable-enimations" to X settings.
2005-12-05 21:06:57 +00:00
Matthias Clasen
3353d528b4 Use g_slice instead of mem chunks.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkevents.c:
	* gdk/gdkcolor.c: Use g_slice instead of mem chunks.
2005-12-05 20:51:18 +00:00
Tor Lillqvist
2aadb2dff2 Implement the conditional use of FlashWindowEx() properly for MSVC
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement the conditional use of FlashWindowEx() properly for MSVC
	compilations. The code was confusingly assuming that if compiled
	with a "new" compiler, it will only be run on "new" Windows
	versions. We want it to run on "old" versions, too, even if
	compiled with a "new" compiler. There are two orthogonal issues:
	whether the compiler defines the necessary API in its headers, and
	whether it is present at run-time. (#318077)
2005-11-28 08:40:56 +00:00
Tor Lillqvist
3ff34d06e8 Once again rework Win32 window decoration code. Doesn't break #104514. The
2005-11-27  Tor Lillqvist  <tml@novell.com>

	Once again rework Win32 window decoration code. Doesn't break
	#104514. The dialogs in gtk-demo now have the same decorations and
	behaviour as on X11. Tried to fix #322516 but it seems very hard
	to make the trivial sample program there behave as expected. OTOH,
	simply moving the gtk_window_decorate() call in the #322516 sample
	program after the call to gtk_widget_show() helps...

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. Each call to gdk_window_set_decorations()
	which calls this function is supposed to affect all decorations.

	(decorate_based_on_hints): New function, looks at both geometry
	hints and type hint and sets window decorations based on
	that. Consolidate code from gdk_window_set_geometry_hints() and
	gdk_window_set_type_hint() here.

	(gdk_window_set_geometry_hints, gdk_window_set_type_hint): Call
	decorate_based_on_hints().
2005-11-27 02:58:09 +00:00
Tor Lillqvist
575149342b Revert to the correct semantics. (#322516)
2005-11-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. (#322516)
	(gdk_window_set_geometry_hints): Adjust call correspondingly.
2005-11-27 00:20:55 +00:00
Anders Carlsson
1097260aa7 Add quartz backend.
2005-11-21  Anders Carlsson  <andersca@imendio.com>

        * configure.in:
        * gtk/Makefile.am:
        * gdk/Makefile.am:
	* gdk/quartz/*:
	Add quartz backend.

        * docs/tools/Makefile.am:
	Only build docshooter when the X11 backend is used.

        * gtk/gtkplug-stub.c:
	Include gtkplug.h here.

        * gtk/gtksocket-stub.c:
	Include gtksocket.h here.
2005-11-22 10:03:32 +00:00
Michael Natterer
6e802acd48 new internal function which destroys the display's event source. Also
2005-11-16  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
	function which destroys the display's event source. Also removes
	the source from the global display_sources list and unrefs it.

	* gdk/x11/gdkprivate-x11.h: declare the function.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
	instead of half-destroying the source here.
2005-11-16 12:36:22 +00:00
Michael Natterer
1500848841 destroy display->xid_ht as late as possible (right before XCloseDisplay)
2005-11-15  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy
	display->xid_ht as late as possible (right before XCloseDisplay)
	because it still needs to be around when the display's screens are
	finalized. (#85715)
2005-11-15 14:42:48 +00:00
Matthias Clasen
c0b7b9e651 Documentation improvements. (#321338)
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcolor.c (gdk_color_parse): Documentation
	improvements.  (#321338)
2005-11-14 04:34:43 +00:00
Matthias Clasen
6556787e0a Remove an erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get): Remove an erroneous
	semicolon.
2005-11-10 17:42:48 +00:00
Matthias Clasen
83e2e23fe1 Don't corrupt odd keymaps (#316638, Kean Johnston)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Don't corrupt odd keymaps (#316638, Kean Johnston)

	* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
	handle frobbing keymaps with odd numbers of syms/code.

	* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
	frob the keymap.
2005-11-10 17:38:09 +00:00
Michael Natterer
8bdc0bf97c Applied patch from maemo-gtk that addresses many issues wrt display
2005-11-10  Michael Natterer  <mitch@imendio.com>

	Applied patch from maemo-gtk that addresses many issues wrt
	display migration and display closing (bug #85715).

	* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
	default display to NULL when it's closed. Instead set the most
	recently opened display as new default (if one exists).

	* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
	of this callback.

	* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
	exist before unrefing them.

	* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
	is closed, allow destruction of the root window.

	* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
	dispose(), free stuff that was leaked before.

	* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
	the xsettings_client still exists before destroying it.

	* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
	X resources.

	* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
	dispose() implementation.

	* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
	dispose() and check if it still exists before unrefing it. Set
	their pointers to NULL/None *after* upchaining in dispose(),
	because X11 implementations of members of the parent class still
	need them for their own destruction.

	* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
	was g_error()ing when finalizing a visual.

	* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
	get_clipboard_widget() because it would create the widget if it
	doesn't exist. Use g_object_get_data() directly instead.

	* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
	of this callback.
2005-11-10 12:09:42 +00:00
Tor Lillqvist
3b9a63ec6e gdk/gdkinternals.h Add new GDK_DEBUG_DRAW flag to the GdkDebugFlag enum.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/gdkinternals.h
	* gdk/gdk.c (gdk_debug_keys[]): Add new GDK_DEBUG_DRAW flag to
	the GdkDebugFlag enum.

	* gdk/win32/gdkdrawable-win32.c: Use DRAW to trigger GDK_NOTEs in
	this file instead of MISC. Now asking for MISC will give mainly
	window manipulation debugging output.
2005-11-09 13:10:27 +00:00
Tor Lillqvist
9b5c5f9db5 Remove unnecessary includes.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.

	(_gdk_win32_get_adjusted_client_rect): Remove this two-line
	function which was used only in one place.

	(get_outer_rect): Use _gdk_win32_adjust_client_rect().

	(gdk_window_set_geometry_hints): If we have identical minimum and
	maximum size hints, remove the resize and maximize
	decorations/functions. (#104514)

	If we have a maximum size hint, remove the maximize
	decoration/function but ensure the resize decoration/function is
	available. Otherwise ensure both resize and maximize
	decorations/functions are there.

	(set_or_clear_style_bits): Factored out common code from
	gdk_window_set_decorations() and gdk_window_set_functions().

	Hack the window style setting once more: Only touch the window
	style bits corresponding to the GdkWMDecoration or GdkWMFunction
	parameter bitmasks. Hopefully this finally is the correct thing to
	do. We used to clear all other bits than those that were being
	set, or set all other bits than those that were being cleared.

	Take into account that adding or removing decorations leaves the
	window's outer size unchanged, i.e., the client area's size and
	position change. This is apparently not what we want, so change
	also the window's (outer) position and size appropriately so that
	the client area's position and size stay constant.

	gtk-demo's color selector dialog is now non-resizable like on X11
	(I tested with metacity in GNOME). Torn off menus are shrinkable
	vertically but have a maximum size, and are not maximizable or
	minimizable, like on X11.

	(gdk_window_set_decorations, gdk_window_set_functions): Let
	set_or_clear_decorations() do most of the job.

	* gdk/win32/gdkprivate-win32.h: Remove declaration of
	_gdk_win32_get_adjusted_client_rect().
2005-11-09 12:35:56 +00:00
Tor Lillqvist
64f1e8378b gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32) Store the type
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32)
	* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_init,
	gdk_window_get_type_hint, gdk_window_get_type_hint): Store the
	type hint. Implement gdk_window_get_type_hint() by just returning
	the hint stored.
2005-11-09 02:13:35 +00:00