summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkdrawable-x11.c
Commit message (Collapse)AuthorAgeFilesLines
* Add function accessors for x11 window/pixmap implAlexander Larsson2009-09-041-0/+11
|
* Make clipmasks work for pixbuf renderingAlexander Larsson2009-07-071-2/+15
| | | | | | | This is more important in the client side windows world, as clip masks may be used for clipping to non-native subwindows. This fixes a bug in aisleriot where it uses masked pixbuf drawing and it ends up drawing over the moving card subwindow.
* Make GdkDrawable draw_drawable backwards compatAlexander Larsson2009-07-011-1/+1
| | | | | | Turns out pygtk build broke due to the argument addition to draw_drawable. So, we now add a new vfunc for the new draw_drawable and are thus backwards compat.
* Move new draw_drawable argument to end to make it more backwards compatAlexander Larsson2009-07-011-4/+4
|
* Rename gdk_window_set_has_native to gdk_window_ensure_nativeAlexander Larsson2009-06-011-1/+1
| | | | | | | | This also removes the (unimplemented) possibility to change a window to non-native. This seems generally not very useful, and there are some problems with it, for instance if two "users" need a window to be native and then one of the "users" doesn't need it anymore it can't change it back, because it is unaware of the other reason the window is native.
* Add support for client side graphics exposures in gdk_draw_drawableAlexander Larsson2009-05-271-0/+2
|
* Workaround X11 clipping bugAlexander Larsson2009-04-021-3/+40
| | | | | | | | | | It turns out that XCopyArea handling of obscured source regions is buggy. It clears the destination area even outside the GC clip region. We work around this for the pixmap->window case as that can happen in gtk+ and is easy to work around. X Bug report at: http://lists.freedesktop.org/archives/xorg/2009-February/043318.html
* Only sync the display if creating a native window implicitlyAlexander Larsson2009-04-021-2/+10
|
* Really create a native window when getting xidAlexander Larsson2009-04-021-4/+6
|
* Create native window when requesting xidAlexander Larsson2009-04-021-2/+4
|
* Initial client-side-windows workAlexander Larsson2009-04-021-26/+55
| | | | | | | The history before this was kind of twisted as several different approaches were tested, so that was all squashed into this initial commit to hide the uninteresting changes and files that were later removed.
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* Don't leak ShmPixmapInfo. (#349858, Chris Wilson)Matthias Clasen2006-08-151-2/+18
| | | | | | | 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)
* Remove extraneous ;Matthias Clasen2006-05-141-1/+1
|
* Use G_DEFINE_TYPE.Matthias Clasen2006-04-041-38/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Intern type names before registering the type to avoid unnecessary copies.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_type): * gdk/x11/gdkscreen-x11.c (_gdk_screen_x11_get_type): * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_impl_x11_get_type): * gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_get_type): * gdk/x11/gdkinput.c (gdk_device_get_type): * gdk/x11/gdkimage-x11.c (gdk_image_get_type): * gdk/x11/gdkgc-x11.c (_gdk_gc_x11_get_type): * gdk/x11/gdkdrawable-x11.c (_gdk_drawable_impl_x11_get_type): * gdk/x11/gdkdnd-x11.c (gdk_drag_context_get_type): * gdk/x11/gdkdisplay-x11.c (_gdk_display_x11_get_type): * gdk/x11/gdkcolor-x11.c (gdk_colormap_get_type): * gdk/gdkwindow.c (gdk_window_object_get_type): * gdk/gdkscreen.c (gdk_screen_get_type): * gdk/gdkrectangle.c (gdk_rectangle_get_type): * gdk/gdkpixmap.c (gdk_pixmap_get_type): * gdk/gdkkeys.c (gdk_keymap_get_type): * gdk/gdkfont.c (gdk_font_get_type): * gdk/gdkevents.c (gdk_event_get_type): * gdk/gdkdraw.c (gdk_drawable_get_type): * gdk/gdkdisplaymanager.c (gdk_display_manager_get_type): * gdk/gdkdisplay.c (gdk_display_get_type): * gdk/gdkcursor.c (gdk_cursor_get_type): * gdk/gdkcolor.c (gdk_color_get_type): Intern type names before registering the type to avoid unnecessary copies.
* Fix have_base_pc / have_base_x_pc typo.Owen Taylor2005-08-151-2/+0
| | | | | | | | | | | | 2005-08-15 Owen Taylor <otaylor@redhat.com> * configure.in: Fix have_base_pc / have_base_x_pc typo. * gdk/x11/gdkdrawable-x11.c gtk/gtksettings.c: Remove panoxft.h includes. (#313417, James Andrewartha) * configure.in: Add fontconfig to X_PACKAGES, since we use it for FcNameConstant(). (More of #313417)
* Follow change in cairo API to add Screen* toKeith Packard2005-07-211-0/+1
| | | | | | | | | 2005-07-20 Keith Packard <keithp@keithp.com> * gdk/x11/gdkdrawable-x11.c: (gdk_x11_ref_cairo_surface): Follow change in cairo API to add Screen* to cairo_xlib_create_surface_for_bitmap
* Update to changed cairo interface.Owen Taylor2005-05-171-11/+30
| | | | | | | | | | | | | | | 2005-05-17 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (gdk_x11_ref_cairo_surface): Update to changed cairo interface. * gdk/x11/gdkdrawable-x11.[ch]: Add _gdk_x11_drawable_update_size() * gdk/x11/gdkwindow-x11.c (gdk_window_resize) (gdk_window_move_resize) * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call _gdk_x11_drawable_update_size().
* Update for cairo-xlib API change.Owen Taylor2005-05-141-11/+13
| | | | | | | | | 2005-05-13 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c: Update for cairo-xlib API change. * gdk/x11/gdkpixmap-x11.[ch] gdk/gdk.symbols: Export gdk_pixmap_impl_x11_get_type(), needed in gdkdrawable-x11.c.
* Fill in unused bits so they can be used for the depth-32 target case.Owen Taylor2005-05-091-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-05-09 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br): Fill in unused bits so they can be used for the depth-32 target case. Rewrite so that that gives a marginal speedup rather than a marginal slowdown. (on x86) * gdk/gdkscreen.h gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkvisual-x11.c: Add gdk_screen_get_rgba_colormap/visual to get a visual for windows with an alpha channel, if one exists. * gdk/win32/gdkscreen-win32.c gdk/linux-fb/gdkscreen-fb.c: Stub out gdk_screen_get_rgba_colormap/visual. * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors): computation of "unused" wasn't right for depth == 32, since it depended on shifting by 32. * gdk/gdkrgb.c: Fill in alpha bits with 1s. (Based on patch from Keith Packard, http://mail.gnome.org/archives/gtk-devel-list/2004-June/msg00080.html) * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture): Implement again, without using Xft. * tests/testgtk.c: Add a test for windows with an alpha channel.
* Add a draw-border style property to allow themes to draw outside theOwen Taylor2005-05-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Call cairo_surface_finish()Owen Taylor2005-03-181-8/+1
| | | | | | | | | | 2005-03-18 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_finish): Call cairo_surface_finish() * gdk/gdkinternals.c gdk/x11/gdkdrawable-x11.c: Remoev _gdk_windowing_set_surface_device_offset().
* Switch set_cairo_target() virtual function to ref_cairo_surface()Owen Taylor2005-03-171-371/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-161-1/+5
| | | | | | | | | | | | | | | | | 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.
* Set have_render_with_trapezoids to GDK_YES when we have a new enoughMatthias Clasen2005-02-211-7/+7
| | | | | | | | 2005-02-20 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids): Set have_render_with_trapezoids to GDK_YES when we have a new enough Render extension. (#167965,Billy Biggs)
* #include cairo-xlib.hManish Singh2005-02-041-0/+2
| | | | | | Thu Feb 3 19:15:55 2005 Manish Singh <yosh@gimp.org> * gdk/x11/gdkdrawable-x11.c: #include cairo-xlib.h
* Add gdk_drawable_set_cairo_target().Owen Taylor2005-02-031-0/+50
| | | | | | | | | | | | | | | | | 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.
* Tue Jan 18 13:46:46 2005 Manish Singh <yosh@gimp.orgManish Singh2005-01-181-15/+17
| | | | | * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids): disambiguate nested if/else.
* Avoid X errors when running against servers which implement XRender < 0.4.Matthias Clasen2005-01-181-2/+32
| | | | | | | | | | | | | | | | | | 2005-01-18 Matthias Clasen <mclasen@redhat.com> Avoid X errors when running against servers which implement XRender < 0.4. (#164427, Albert Chin) * gdk/x11/gdkprivate-x11.h: * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids): New function to check for trapezoid support in XRender. (gdk_x11_draw_trapezoids, _gdk_x11_drawable_draw_xtrapezoids): Use it here. * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a separate have_render_with_trapezoids field. * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize it.
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_draw_xtrapezoids) CallOwen Taylor2004-11-301-8/+4
| | | | | | | | | | | | Tue Nov 30 09:46:49 2004 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_draw_xtrapezoids) * gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_draw_xft_glyphs): Call gdk_x11_drawable_update_xft_clip (part of #159929, James Henstridge) * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_glyphs_transformed): Remove unused variables.
* Add GdkPangoRenderer, a subclass of PangoRenderer targeting GDK drawables.Owen Taylor2004-11-211-18/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Fix many sparse warnings.Matthias Clasen2004-10-281-1/+1
|
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Cast to 32-bit integers when premultiplying, suggested by Keith Packard.Anders Carlsson2004-07-271-3/+3
| | | | | | | 2004-07-28 Anders Carlsson <andersca@gnome.org> * gdk/x11/gdkdrawable-x11.c (gdk_draw_rectangle_alpha_libgtk_only): Cast to 32-bit integers when premultiplying, suggested by Keith Packard.
* Add gdk_draw_rectangle_alpha_libgtk_only which uses XRenderFillRectangleAnders Carlsson2004-07-271-2/+67
| | | | | | | | | | | | | | | | | | | | | 2004-07-27 Anders Carlsson <andersca@gnome.org> * demos/gtk-demo/iconview.c: (do_iconview): * gdk/gdkdrawable.h: * gdk/linux-fb/gdkdrawable-fb2.c: (gdk_draw_rectangle_alpha_libgtk_only): * gdk/win32/gdkdrawable-win32.c: (gdk_draw_rectangle_alpha_libgtk_only): * gdk/x11/gdkdrawable-x11.c: (gdk_x11_draw_image), (get_impl_drawable), (gdk_x11_draw_pixbuf), (gdk_draw_rectangle_alpha_libgtk_only): Add gdk_draw_rectangle_alpha_libgtk_only which uses XRenderFillRectangle on X11. It's stubbed out on the Win32 and fb backends. * gtk/gtkiconview.c: (gtk_icon_view_paint_rubberband): Use gdk_draw_rectangle_alpha_libgtk_only here.
* Merge from stable:Michael Natterer2004-06-211-38/+32
| | | | | | | | | | | | | 2004-06-21 Michael Natterer <mitch@gimp.org> Merge from stable: * gdk/x11/gdkdrawable-x11.[ch]: made convert_format() utility function public as _gdk_x11_convert_to_format(). * gdk/x11/gdkcursor-x11.c (create_cursor_image): premultiply the pixels from the GdkPixbuf when putting them in the Xcursor image. Fixes bug #144350.
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-2/+2
| | | | | | | | | | 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>
* GC caching, bug #125645 (based on patch by Brian Cameron)Soeren Sandmann2004-02-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix for #119722, reported by Olexiy Avramchenko, patch by Owen Taylor.Soeren Sandmann2004-02-171-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | Tue Feb 17 23:02:58 2004 Soeren Sandmann <sandmann@daimi.au.dk> Fix for #119722, reported by Olexiy Avramchenko, patch by Owen Taylor. * gdk/x11/gdkprivate-x11.h (struct _GdkGCX11): Add a depth field * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Keep track of the GC's depth. * gdk/x11/gdkgc-x11.c (_gdk_gc_x11_get_fg_xft_color): First query the colormap, if no colormap, special case depth 1, * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_get_fg_picture): Use _gdk_gc_x11_get_fg_xft_color() to get the foreground color. * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_xft_draw): Special-case bitmaps without a colormap. * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Use inherited draw_pixbuf() implementation in the bitmap case.
* Revert changes from #113476 and go back to using XftDrawSetClip, becauseOwen Taylor2004-01-301-0/+20
| | | | | | | | Fri Jan 30 11:37:37 2004 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c: Revert changes from #113476 and go back to using XftDrawSetClip, because XftDrawSetClipRectangles is buggy in XFree86-4.3.
* Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)Owen Taylor2003-08-181-40/+57
| | | | | | | | Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (convert_to_format): Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)
* Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):Owen Taylor2003-08-151-0/+2
| | | | | | | | | | | | | | | | Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com> Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai): * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that we link libgtk against X explicitely, since we make GTK+ calls for plug/socket. * gtk/queryimmodules.c: Use USE_LA_MODULES and G_MODULE_SUFFIX here. * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect XShmPutImage with #ifdef USE_SHM.
* Requires glib-2.3.0, pango-1.2.0.Owen Taylor2003-08-021-116/+7
| | | | | | | | | | | | | | | | | | | Sat Aug 2 12:53:16 2003 Owen Taylor <otaylor@redhat.com> * configure.in: Requires glib-2.3.0, pango-1.2.0. * configure.in: Require Xft version 2, remove code for handling older versions of pango and Xft. Many miscellaneous improvements to X checks * acinclude.m4: Add GTK_ADD_LIB() macro for adding a library to a variable, avoiding dups. * gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display): Always load "fixed" * gdk/x11/gdk*-x11.[ch]: Remove support for Xft1 and for pangox.
* If the check for missing depths, try actually creating pixmaps of theOwen Taylor2003-08-011-0/+31
| | | | | | | | | Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render): If the check for missing depths, try actually creating pixmaps of the depths to deal with Xinerama not reporting all the depths it should. (#115822)
* Remove bad optimization for src_rowstride == dest_stride. (Didn't considerOwen Taylor2003-06-031-7/+0
| | | | | | | | | | Tue Jun 3 15:05:47 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (convert_to_format): Remove bad optimization for src_rowstride == dest_stride. (Didn't consider the case where we were copying only partial widths of a wider source buffer) (#113034, reported by Hans Petter Jansson)
* Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 anyway.Matthias Clasen2003-05-211-20/+0
| | | | | | | | 2003-05-22 Matthias Clasen <maclas@gmx.de> * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_update_xft_clip): Use XftDrawSetClipRectangles(), since we're inside HAVE_XFT2 anyway. (#113476)
* Fix pointer arithmetic on 'void *'. (#108322)Owen Taylor2003-04-181-2/+2
| | | | | | | Fri Apr 18 16:57:44 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (draw_with_images/pixmaps): Fix pointer arithmetic on 'void *'. (#108322)
* Patch from Morten Welinder to catch Sun servers with a brokenOwen Taylor2003-04-181-6/+51
| | | | | | | | Fri Apr 18 15:56:46 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkdrawable-x11.[ch]: Patch from Morten Welinder to catch Sun servers with a broken implementation of the RENDER extension. (#108309)
* Don't try to use render if we can't get a picture for the drawable. (FixesOwen Taylor2002-11-071-1/+2
| | | | | | | | | | | | | | Thu Nov 7 17:18:06 2002 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Don't try to use render if we can't get a picture for the drawable. (Fixes #97220, reported by Jamie Zawinski) * gtk/gtkimage.c: Force requisition calculation when we get a expose prior to size_request(). (#91711, reported by Sven Neumann, debugging help from Matthias Clasen, Soeren Sandmann)