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-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.
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-09-26 Matthias Clasen <mclasen@redhat.com>
Fix#316871, reported by Dan Winship:
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
(gdk_window_shape_combine_region): Set it here.
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
remove the child area for shaped windows.
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
color when !has_opacity.
2005-05-10 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
files for Cairo convenience functionality.
* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
convenience functions to add GdkRectangle, GdkRegion to a cairo path.
* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().
* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
gdk_drawable_create_cairo_context() to gdk_cairo_create().
* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
Rename gdk_pixbuf_set_as_cairo_source() to
gdk_cairo_set_source_pixbuf().
* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
Adjust for renames.
* gdk/gdk.symbols: Update.
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
coordinate system problem that was causing the wrong portions
to be invalidated.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
gtk/gtkcellview.c (gtk_cell_view_expose)
gtk/gtkdnd.c (gtk_drag_highlight_expose)
gtk/gtkentry.c (gtk_entry_draw_text)
gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.
* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
GTK+ style ... use instance-private data and standard names for
private structure, etc. Move function docs inline.
* gtk/gtkcalendar.[ch]: Switch to drawing everything in
expose. Switch drawing to Cairo.
* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
gtk_calendar_freeze/thaw
2005-04-28 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add a draw-border style property to allow
themes to draw outside the widget's allocation.
* gdk/gdkwindow.c gtk/gtkstyle.c: Remove some save/restore pairs
that were working around the clip-leakage bug in Cairo.
* gtk/gtkstyle.c: Use cairo_fill_preserve() rathe than
save/fill/restore.
* gdk/gdkgc.c gdk/gdkinternals.h: Add _gdk_gc_update_context()
That updates a Cairo context to match a GC.
* gdk/gdkdraw.c: Use _gdk_gc_update_context() to add support
for tiles/stipples/clipping to gdk_draw_glyphs(),
gdk_draw_trapezoids().
* gdk/gdkpango.c: Use _gdk_gc_update_context() instead of internal
implementation of stipples. Use one cairo_t across the entire
drawing operation. Replace cairo_matrix_create() with
stack-allocated matrices.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c: Save various aspects of the
GC state (fill, tile, stipple, foreground, background, clip region)
in instance-private-data for future use. Add getters.
Get rid of _gdk_windowing_gc_get_foreground() function implemented
by the backends.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Add
_gdk_gc_init() to do initial setup of the GC from values;
fixes some problems from drawable redirection.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Move
gdk_gc_copy() and gdk_gc_set_clip_{region,rectangle}() into
the generic code, add _gdk_windowing_gc_copy(),
_gdk_windowing_gc_set_clip_region() to do backend specific
stuff.
* gdk/x11/{gdkprivate-x11.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
gdk/win32/{gdkprivate-win32.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
gdk/linux-fb/{gdkprivate-fb.h,gdkgc-fb.c.c,gdkdrawable-fb.c}:
Don't duplicate state that now is stored by the generic code.
* gdk/gdk.symbols Update
2005-04-18 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c
* gdk/gdkcolor.c gdk/gdkwindow.c gdk/gdkpixbuf-render.c
gdk/gdkpango.c tests/testcairo.c: Update to new Cairo API for
setting color and opacity. (#301066, Vincent Noel)
Mon Mar 28 15:13:42 2005 Søren Sandmann <sandmann@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
invalidate areas that are covered by mapped input-output child
windows. Bug 141380.
2005-02-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: Use cairo_set_device_offset().
* gdk/win32/gdkdrawable-win32.[ch] gdk/win32/gdkwindow-win32.c
gdk/win32/gdkpixmap-win32.c:
Add_gdk_win32_drawable_acquire/release_dc() to get a DC for the
drawable. Add _gdk_drawable_win32_finish() to clean up resources
when a drawable is destroyed.
* gdk/win32/gdkgc-win32.c gdk/win32/gdkdrawable-win32.c
(blit_from_pixmap) gdk/win32/gdkprivate-win32.h : Use
acquire/release_dc when getting a DC to use with a GC or for
blitting from a pixmap.
* gdk/win32/gdkdrawable-win32.[ch]: Implement ref_cairo_surface()
* gdk/win32/gdkpango-win32.c gdk/win32/gdkdrawable-win32.c Makefile.am:
Remove gdk_screen_get_pango_context(), draw_glyph[_transformed]
implementations.
* gdk/win32/gdkdrawable-win32.c: Remove
gdk_draw_rectangle_alpha_libgtk_only()
2005-03-15 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c gdk/gdkwindow.c
gdk/x11/gdkdrawable-x11.c gdk/x11/gdkpixmap-x11.c gdk/x11/gdkwindow-x11.c
gdk/gdkinternals.h: Switch set_cairo_target() virtual function to
ref_cairo_surface()
* gdk/gdkdrawable.h gdk/gdkdraw.h: Switch set_cairo_target() virtual
function to create_cairo_context()
* gdk/gdkwindow.c: Clear double buffer pixmaps with Cairo.
* gdk/x11/gdkwindow-x11.c: Keep all components in GdkWindowObject.bg_color,
not just the pixel.
* tests/testcairo.c: Update for create_cairo_context()
* gdk/gdkdraw.c (gdk_draw_trapezoids, gdk_draw_glyphs[_transformed]):
Reimplement in terms of Cairo, bypass the vtable entries.
* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/x11/gdkgc-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkprivate-x11.h gdk/x11/Makefile.am: Remove
implementation of draw_trapezoids / draw_glyphs[_transformed].
* gdk/gdkpango.c: Switch GdkPangoRenderer to use Cairo
* gdk/gdkpango.c gdk/x11/gdkpango-x11.c: Move
gdk_pango_context_get_for_screen() into the backend independent code.
* gdk/x11/gdkdrawable-x11.[ch]: Remove Xft use, use RENDER directly
for drawing images.
* gdk/gdkdrawable.h gdk/x11/gdkdrawable-x11.c: Remove
gdk_draw_rectangle_alpha_libgtk_only.
* gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c: Add
gdk_pixbuf_set_as_cairo_source()
* gdk/gdk.symbols: Update
* gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkruler.[ch]
gtk/gtk[hv]ruler.c: Convert to Cairo rendering.
* gtk/gtkstyle.c (gtk_default_draw_check, gtk_default_draw_focus,
gtk_default_draw_option): Switch to Cairo. Simplify the checkbutton,
radio button style for now to get something more scalable.
* gtk/gtksettings.c: #if 0 out the code to use PangoXft for hinting/
antialiasing/dpi settings.
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
2005-02-03 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.[ch] gdkpixmap.c gdkwindow.c: Add
gdk_drawable_set_cairo_target().
* tests/testtreeflow.c (enum): Use grand not rand as a variable
name because one of the cairo headers is pulling in stdlib.h.
* tests/testcairo.c tests/Makefile.am: Add a simple cairo based
example.
* configure.in: Bump release to 2.7.0, gtk_binary_version to 2.7.0.
* Require libpangocairo for all backends.
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Sat Nov 20 15:13:51 2004 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of
PangoRenderer targeting GDK drawables. Use to implement the old
gdk_draw_layout() and friends.
* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Add gdk_draw_glyphs_transformed() gdk_draw_trapezoids() and
the corresponding members of GdkDrawableClass. Add a fallback
implementation of gdk_draw_trapezoids() in terms of pixbufs.
* gdk/gdkwindowing.h gdk/x11/gdkg-x11.h: Add
_gdk_windowing_gc_get_foreground() to enable the fallback
trapezoid implementation.
* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkdisplay-x11.h: Implement
draw_glyph_transformed, draw_trapezoids.
* gdk/x11/gdkdrawable-x11.[ch]: Add
_gdk_x11_drawable_draw_xtrapezoids, _gdk_x11_drawable_draw_xft_glyphs
for use of GdkX11Renderer.
* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Implement
GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED in the RENDER codepath.
* gdk/gdkpango-x11.c: Add GdkX11Renderer... a subclass of
PangoXftRenderer that does tiles/stipples and fallback rendering
of trapezoids without the RENDER extension.
* gdk/gdkpango-x11.c gdk/x11/gdkscreen-x11.[ch] _gdk_x11_renderer_get:
Add _gdk_x11_renderer_get() to get a singleton GdkX11Renderer
for the screen.
* gdk/x11/gdkdrawable-x11.c (get_impl_drawable): Fix a None/NULL
confusion.
* gtk/gtklabel.[ch] gtk/gtk.symbols: Add gtk_label_set/get_angle(),
and an ::angle property.
* gtk/gtklabel.c: Remove #if 0'd dead code gtk_label_paint_word().
* gtk/gtktextdisplay.c: Switch to using a GtkTextRenderer subclass
of GdkPangoRenderer for drawing.
* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Switch to using
gtk_attr_shape_new_with_data() to store backreferences to
embedded pixmaps and widgets. Leave line_display->shaped_objects
around for backwords compatibility.
* gdk/gdkpango.[ch] (gdk_pango_context_set_colormap): Describe
as deprecated, remove implementation.
* gtk/gtkwidget.c (gtk_widget_create_pango_context): Remove
call to gdk_pango_context_set_colormap.
* demos/gtk-demo/Makefile.am demos/gtk-demo/rotated_text.c: Add
a demo showing drawing rotated text.
* tests/testgtk.c: Add a rotated-label test, and also a rotated
drawing test (differs from demos/gtk-demo/rotated_text by also
using a tile)
Wed Oct 6 00:45:04 2004 <timj@birnet.org>
* gdk/gdkwindow.c (gdk_window_is_viewable): check the iteration window
variable, not just the window passed in. fixes#145270.
2004-08-26 Matthias Clasen <mclasen@redhat.com>
Make gdk_window_process_[all]_updates() respect
update_freeze_counter (#144272, Soeren Sandmann)
* gdk/gdkwindow.c (gdk_window_schedule_update): New function to
install an idle for gdk_window_update_idle() if one isn't there
already.
(gdk_window_process_all_updates):
(gdk_window_process_updates): Only process the updates if the
window isn't frozen.
(gdk_window_invalidate_maybe_recurse): Schedule an update when
necessary.
(gdk_window_thaw_updates): Use gdk_window_schedule_update() instead
of directly installing the idle.
Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gdk/Makefile.am: Add rules to generate gdk.def and
gdkalias.h from gdk.symbols, and make make check check
the abi with abicheck.sh.
* gdk/gdk.symbols: New file. Definition of the GDK ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gdk/abicheck.sh: New file. Script to check the actually
symbols exported from libgdk-x11.2.0.so against the symbols
found in gdk.symbols.
* gdk/makegdkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
Tue Jul 13 00:40:29 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Do an
empty begin_paint_region()/end_paint() for windows without
EXPOSURE_MASK.
* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_tmp_unset_bg,
_gdk_x11_window_tmp_reset_bg): Remove checks for EXPOSURE_MASK.
Sat Mar 13 12:17:16 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Make
this a total no-op when the new or old parent is
destroyed. (#134230, patch from Soeren Sandmann)
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
For foreign windows in our heirarchy, call
_gdk_windowing_window_destroy_foreign (window) and skip
all the normal destruction logic.
* gdk/x11/gdkwindow-x11.c gdk/win32/gdkwindow-win32.c:
Move code to request destruction of a foreign window
code into a separate _gdk_windowing_window_destroy_foreign().
* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize):
Call GDK_WINDOW_DISPLAY() on the wrapper not on the
impl. (Also from Soeren's patch)
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
case where the background is a solid color.
(gdk_window_clear_backing_rect): Reset the clip region after use.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): Go
back to using a scratch GC. Pointed out by Owen Taylor
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Only use a
scratch GC if the passed-in one is NULL
Wed Feb 18 14:27:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_get_composite_drawable): Reset clip
region back to NULL on cached GC (rest of #134728)
Wed Feb 18 13:28:57 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix bug reported by Nam SungHyun.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha):
Don't use a cached GC here since the function needs to modify the
foreground color.
* gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back
to NULL on the cached GC.
Wed Feb 18 01:44:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
GC caching, bug #125645 (based on patch by Brian Cameron)
* gdk/gdkscreen.h (struct _GdkScreen): Add GC cache
* gdk/gdkscreen.c (gdk_screen_dispose): New function. Unref the
cached GC's here.
* gdk/gdkdraw.c (_gdk_drawable_get_scratch_gc): New function to
get a scratch gc.
* gdk/gdkinternals.h: Declare the function here
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Use
_gdk_drawable_get_scratch_gc() instead of creating a new GC.
* gdk/x11/gdkgeometry-x11.c (gdk_window_copy_area_scroll): same
* gdk/x11/gdkdrawable-x11.c (draw_with_images): same
* gdk/gdkwindow.c (gdk_window_get_composite_drawable): same
* gdk/gdkwindow.c (gdk_window_end_paint): same
* gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): same
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): same
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask_for_colormap): same
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Sep 1 19:39:14 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Fix bug where the
background pixmap was being offset twice, once by the ts_origin in
gdk_window_get_bg_gc(), and once by gdk_draw_rectangle().
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
own pixmap instead of sharing one.
* tests/testgtk.c (create_get_image): Fixes to make the window fit
on an 800x600 screen
Wed Jul 9 19:48:26 2003 Kristian Rietveld <kris@gtk.org>
Merge from stable.
* gdk/gdkdisplay.c (gdk_display_get_window_at_pointer): don't
directly return from ->window_at_pointer, but set win_x and win_y
first if needed. (Fixes#110166, reported by Arno Charlet).
* gdk/gdkwindow.c (gdk_window_get_composite_drawable): change
function to accept GdkDrawables and not just GdkWindows. This was
already done in some other functions a while back, but this patch
got lost for some reason.
Fri Jul 4 15:57:52 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter):
Use asynchronously _gdk_x11_set_input_focus_safe
to avoid having to trap errors and XSync().
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Use
_gdk_x11_set_input_focus_safe() here as well.
* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed):
Rework handling of property notifies on _NET_WM_STATE
so that we ignore _NET_WM_DESKTOP notifies unless we
really care.
* gdk/x11/gdkimage-x11.c (gdk_image_check_xshm): Use
XShmQueryExtension() rather than XQueryExtension() to
avoid extra rountrip.
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
Remove unused call to XGetWindowAttributes()
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Remove
unused call to XGetKeyboardControl().
* gdk/x11/gdkdisplay-x11.c gdk/gdk.def (gdk_display_flush):
Add (#99571)
* gdk/win32/gdkevents-win32.c gdk/linux-fb/gdkevents-fb.c
No-op implementations of gdk_display_flush().
* gdk/gdkwindow.c (gdk_window_process_all_updates): Use
gdk_display_flush() rather than gdk_flush() to avoid
XSync().
* gdk/x11/gdkwindow-x11.c (update_wm_hints)
gdk/x11/gdkwindow-x11.h: Centralize all handling of WM_HINTS here
so that we don't have to get the property back from the server.
* gdk/x11/gdkwindow-x11.c (show_window_internal): Store
the serial of when we map a toplevel to allow optimizing
out notifies on _NET_WM_STATE/_NET_WM_DESKTOP.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Don't
XTranslateCoordinates() for override-redirect windows.
Fri Jul 4 15:59:27 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_group): Remove comment
about setting window group after the window is mapped from docs
- nothing the ICCCM forbids that.
* gdk/x11/gdkcursor-x11.c (gdk_display_get_maximal_cursor_size):
Fix g_return_val_if_fail() in void return function.
* configure.in: Fix misplaced comma that was resulting
in XShm always being disabled.
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):
Before delivering an event to a widget, check that
(if relevant), the event's window is still viewable.
(#105642, Dennis Björklund)
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
NULL out private->parent, since after destruction
it might not be valid any more.
* gdk/gdkwindow.c (gdk_window_is_viewable): Fix some
accesses before g_return_val_if_fail(). Treat
DESTROYED windows as unmapped.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h
gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:
- Replace GdkPointerHooks with a multihead-safe
GdkDisplayPointerHooks, leave GdkPointerHooks
around for singlehead.
- Add gdk_display_get_pointer() to get the pointer
location with the screen it is on.
* gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
Change gdk_screen_get_window_at_pointer() to
gdk_display_get_window_at_pointer().
* gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
not gdk_screen_get_window_at_pointer().
* gtk/gtkcolorsel.c: Fix grabbing color to be multihead
safe.
* gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
since it is useful for writing code that doesn't
know the dcurrent state but needs a clean colormap.
* gtk/gtkrc.c: When loading the settings for a particular
screen, only reset toplevels on that screen.
* gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
that should have been #ifndef GTK_MULTIHEAD_SAFE.
Wed Oct 2 17:46:53 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c
gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf
as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual
function to draw_pixbuf. (#60582)
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]):
Note that these functions are obsolete in the docs.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
Remove all the sanity checks now we make it clear
that it is obsolete name for gdk_draw_pixbuf().
* gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c
gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c
tests/testrgb.c: Use gdk_draw_pixbuf() everywhere.
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix
some warnings.
* gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed
bit from last gdk_event_get_screen() change.
* gdk/gdkevents.c: Couple of small fixes.i
* gdk/gdkwindow.c (gdk_window_update_idle): Add
missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE().
(Report of non-thread-safety from Nicholas Allen)
* gtk/gtkmain.c (rewrite_events_translate): Fix sign
problem with coordinate translation. (Fix from
Robin Lu, #85229)
Wed Jun 5 18:34:47 2002 Owen Taylor <otaylor@redhat.com>
Changes multihead reorganizing code for win32 support,
mostly from a patch by Hans Breuer.
* gdk/gdkcolor.c gdk/x11/gdkcolor-x11.c gdk/gdkcursor.c
gdk/x11/gdkcursor-x11.c gdk/gdkevents.c gdk/x11/gdkevents-x11.c
gdk/gdkfont.c gdk/x11/gdkfont-x11.c gdk/gdkkeys.c
gdk/x11/gdkkeys-x11.c gdk/gdkimage.c gdk/x11/gdkimage-x11.c
gdk/gdkscreen.c gdk/x11/gdkmain-x11.c
gdk/gdkdisplay.c gdk/gdkevents-x11.c gdk/gdkpango.c
gdk/x11/gdkpango-x11.c gdk/gdkselection.c
gdk/x11/gdkselection-x11.c gdk/gdkwindow.c
gdk/x11/gdkwindow-x11.c gdk/gdkvisual.c gdk/x11/gdkvisual-x11.c:
Move port-independent singlehead wrapper functions into
port-independent part of GDK. (#80009)
* gdk/win32/gdkcolor-win32.c gdk/win32/gdkcursor-win32.c
gdk/win32/gdkevents-win32.c gdk/win32/gdkfont-win32.c
gdk/win32/gdkimage-win32.c gdk/win32/gdkkeys-win32.c
gdk/win32/gdkmain-win32.c gdk/win32/gdkproperty-win32.c
gdk/win32/gdkselection-win32.c gdk/win32/gkwindow-win32.c:
Turn singlehead functions into "multihead" functions that ignore
their GdkDisplay or GdkScreen arguments.
* gdk/win32/gdkdrawable-win32.c gdk/win32/gdkevents-win32.c
gdk/win32/gdkinput-win32.c gdk/win32/gdkprivate-win32.h:
Misc multihead-compatibility changes.
* gtk/gtk.def gdk/gdk.def: Update for multihead functions.
* gdk/gdkcolormap.h gdk/gdkvisual.h gdk/x11/gdkcolormap-x11.c
gdk/x11/gdkvisual-x11.c: Remove the screen fields
from the public parts of the colormap/visual structures, add accessors
instead.
* gdk/gdkpixbuf-render.c gdk/gdkpixmap.c gdk/gdkrgb.c
gdk/x11/gdkcolormap-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkimage-x11.c gdk/x11/gdkprivate-x11.h gtk/gtkgc.c
gtk/gtkstyle.c gtk/gtkwidget.c: Use accessors to get the screen
for colormaps, visuals; move the fields into the private
structures for the x11 backend.
* gdk/gdkdisplay.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/gdkscreen.[ch] gdk/x11/gdkscreen-x11.c:
Remove virtualization of screen and display functions.
(#79990, patch from Erwann Chenede)
* gdk/win32/gdkdisplay-x11.c gdk/win32/gdkscreen-win32.c
gdk/win32/{Makefile.am, makefile.msc, makefile.mingw}:
New files containing stub implementations of Display,
Screen functions.
* gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/x11/gdkx.h: Clean up function exports and what
headers they are in. (#79954)
* gdk/x11/gdkx.h: Fix macro that was referring to a non-existant
screen->screen_num. (In the patch for #79972, Erwann Chenede)
* gdk/gdkscreen.c gdk/gdkwindow.c gdk/x11/gdkinternals.h
gdk/x11/gdkscreen-x11.c: Fix gdk_screen_get_window_at_pointer()
to use window hooks. (#79972, patch partly from Erwann Chenede)
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkevents-x11.c: Fix
some warnings.
Thu Apr 25 16:51:40 2002 Owen Taylor <otaylor@redhat.com>
Start of integration of Erwann Chenede's multihead work
from the gtk-multihead branch.
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]
gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkscreen-x11.[ch]
New classes representing a set of screens with attached
input devices and a single contiguous area, respectively.
* gdk/gdk.[ch] gdk/gdkinternals.h gdk/x11/gdkmain-x11.c:
gdk/x11/gdkprivate-x11.h: Make the initialization interface
simple _gdk_windowing_init() and do the rest in
gdk_open_display() calls.
* gdk/gdk.[ch]: Add gdk_parse_args() which can be used
to do the display-independent part of initialization
instead of gdk_init_[check].
* gdk/gdkcursor.h gdk/gdkfont.h gdk/gdkkeys.h gdk/gdkpixmap.h
gdk/gdkproperty.h gdk/gdkselection.h gdk/gdkwindow.h:
Add multihead variants (_for_display(), for_screen()) of functions
getting information specific to a particular screen screen or
display.
* gdk/gdkscreen.[ch]: Add gdk_screen__* variants of functions
like gdk_rgb_get_colormap() that used to get/list global
objects.
* gdk/x11/gdkx.h: Add functions for converting GdkScreen
and GdkDisplay into the X equivalents.
* gdk/x11/gdkwindow-x11.c: Removed gdk_window_xid_at_coords()
not in the headers and unused.
* configure.in gdk/x11/{gxid.c,gxid_lib.[ch],gdkinput-gxi.c}:
Remove gxid support ... has not been tested for a long time...
"xfree" support is more portable to non XFree86.
* gdk/**.h: Add a GDK_MULTIHEAD_SAFE define that can be
used to turn off functions that are inherently non-multihead
safe.
* gdk/**.c: add GDK_NOTE(multihead, ...) calls when functions
are used in non-multihead-safe ways.
* gdk/*.c gdk/x11/*.c: Changes to make the internals of GDK
multihead safe.