Commit Graph

497 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Tor Lillqvist
d08d2c2bd4 Remove code that has been permanently ifdeffed out for two years.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Remove code that has been permanently ifdeffed out for two years.
2005-11-08 22:27:47 +00:00
Tor Lillqvist
90942c4fef Fix also the other place where maskstride was calculated. 2005-11-07 12:05:43 +00:00
Tor Lillqvist
449f16b238 Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
	Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07 08:16:29 +00:00
Tor Lillqvist
bd9e367de7 (pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap, like
2005-11-06  Tor Lillqvist  <tml@novell.com>

	(pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap,
	like pixbuf_to_hbitmaps_normal().
	(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
	G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
	setting the G_WIN32_PRETEND_WIN9X environment variable.

2005-11-06  Tor Lillqvist  <tml@novell.com>

	Make icon masks work on Win98 (#320152, Peter Zelezny)

	* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
	parameter for the depth of the bitmap, so that this function can
	be used to create 1-bit bitmaps, too.
	(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
	and initialize it properly.
2005-11-06 05:36:49 +00:00
Tor Lillqvist
72ea12fec0 As there is only one GdkDisplay in the Win32 backend, check that
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
	the Win32 backend, check that GdkDisplay* parameters are equal to
	_gdk_display instead of using the unnecessarily general
	GDK_IS_DISPLAY().
2005-11-03 13:44:37 +00:00
Tor Lillqvist
5551fc6754 Rename the variables for the color bitmap to have "color" in their name,
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
	Rename the variables for the color bitmap to have "color" in their
	name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
	color bitmap for the mask, too, instead of creating a b&w bitmap
	with CreateBitmap(). Set up the mask bitmap's contents, ones for
	those pixels in the color bitmap where the alpha is zero, zero for
	other pixels. We used to use an unitialized mask bitmap! This
	meant that icons and cursors created presumably worked more or
	less by accident. Totally blank icons with zero alpha everywhere
	(as used by gtktrayicon.c) definitely did not work as expected.
2005-11-03 13:29:30 +00:00
Tor Lillqvist
c2c55f8385 gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 13:33:27 +00:00
Tor Lillqvist
4d1b5589c5 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Add more
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
	pre-interned GdkAtoms and pre-registered clipboard formats. Sort
	their declarations, definitions and assignments into a more
	logical and consistent order.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
	CF_ prefix for the predefined clipboard format names. Put quotes
	around registered format names to distinguish them.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
	immediately with a warning if the property type is STRING, TEXT,
	COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
	should never pretend to handle on Win32. Handle only UTF8_STRING
	here, other formats with delayed rendering. Use \uc1 instead of
	\uc0 when generating Rich Text Format for easier testability on
	XP, where WordPad misinterprets \uc0 encoded characters. Add more
	GDK_NOTE debugging output for Clipboard operations.

	* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
	(gdk_selection_convert): Don't pretent to handle STRING, just
	UTF8_STRING. Streamline error handling, don't unnecessarily have a
	GError which then isn't used for anything anyway if it gets set.
	(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
	COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
2005-11-01 15:29:59 +00:00
Tor Lillqvist
e6fa7394ba Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:08:14 +00:00