Commit Graph

75 Commits

Author SHA1 Message Date
Benjamin Otte
dc7d8dae67 x11: Change GDK_WINDOW_SCREEN macro
on't look at GdkDrawableImplX11->screen, but call
gdk_window_get_screen() instead.
2010-12-02 20:17:27 +01:00
Matthias Clasen
88ef199ed7 Inclusion cleanups in headers 2010-10-14 22:08:53 -04:00
Matthias Clasen
30a660213e More distcheck fixes 2010-10-01 21:40:34 -04:00
Matthias Clasen
0555dd0645 Fix distcheck
Don't include config.h in headers, it doesn't work.
2010-10-01 20:02:35 -04:00
Benjamin Otte
28b4567159 x11: Keep a default X Colormap in every visual to construct windows with
This way, we can specify a colormap when constructing windows. And ew
must do that to avoid BadMatch from XCreateWindow when we use a
different visual.
2010-09-26 15:11:33 +02:00
Benjamin Otte
47ee996198 x11: Use G_DEFINE_TYPE() to define GdkVisual
Also add a priv pointer to GdkVisual and use it for the GdkVisualPrivate
structure. Then Make GdkVisualPrivate actually private to
gdkvisual-x11.c and make other callers use proper function calls to
access it.
2010-09-26 15:11:33 +02:00
Benjamin Otte
a520b4f372 x11: Remove some unused macros 2010-09-26 15:11:31 +02:00
Benjamin Otte
f74f9b2766 gdk: Remove GdkPixmap
All iusers of it are gone, so it's now time to let go.
cairo_surface_t is a full replacement, combined with
gdk_window_create_similar_surface().
2010-09-26 15:11:30 +02:00
Benjamin Otte
55c4cdab1a x11: Make fallback cursor code not use pixmaps
The fallback code for when XCursor wasn't available was still using
GdkPixmap to create the bitmaps.
2010-09-26 15:11:30 +02:00
Havoc Pennington
b837ef5a6d Revamp and modernize X error traps
* add per-display gdk_x11_display_error_trap_push()
  (X11-specific because gdk_error_trap_push() probably
  should have been)
* make gdk_error_trap_push() handle only GDK displays
  not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
  automatically sync only if needed, so manual gdk_flush() is not
  required
* add gdk_error_trap_pop_ignored() which just asynchronously
  ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
  if you use plain pop() and don't need the return value,
  the async gdk_error_trap_pop_ignored() should be used
  instead. This results in lots of warnings to clean
  up in a later patch.

The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 18:19:27 -04:00
Benjamin Otte
8868e77fa0 x11: Remove display_x11->have_render
Also remove setters and getters for the variable and the GdkTristate
enum, as it's the only place where it was used.
2010-08-10 21:02:30 +02:00
Benjamin Otte
6a48a042c7 API: remove GdkGC
XXX: Some traces in the win32 code are left. I suppose they'd best be
replaced using Cairo.
2010-08-10 21:02:29 +02:00
Benjamin Otte
9c026fb32e x11: Remove unused code
These are function definitions and leftover variabl;es that weren't in
use for a while.
2010-08-10 21:02:29 +02:00
Benjamin Otte
65ac54bb23 gdk: Make window moves a custom vfunc
The window move code needs special attention for multiple reasons:
- invalid areas for expose events need to be modified
- self-copy is not supported by Cairo
- in X11, copying from an overlapped Window might cause unexposed areas
  to be copied in, spo expose events for those need to be generated.

This was all special cased in various parts of the code. By making it an
explicit vfunc, we can work around it.
2010-08-10 21:02:28 +02:00
Benjamin Otte
14fe04ec89 API: remove GdkImage
It was unused and buggy.
2010-08-10 21:02:26 +02:00
Benjamin Otte
6f5084551a API: remove gdk_drawable_copy_to_image() 2010-08-10 21:02:26 +02:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Javier Jardón
b4ed51fd93 Remove XID_FONT_BIT 2010-06-28 23:38:03 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
41ef40bec0 [gdk/x11] Change the name of the functions in the header file
_gdk_keymap_add_virtual_modifiers() changed to
_gdk_keymap_add_virtual_modifiers_compat() in
commit 13d69e552d
This patch change the header name too.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=610063
2010-02-16 20:59:22 +01:00
Matthias Clasen
69aa7a6392 Make DND work better with shaped windows
If mouse clicks go through, drag-and-drop should too...
Fixes bug 608615.
2010-02-04 19:18:22 -05:00
Alexander Larsson
939e55223c Ensure that queue_translation is paired with the right X operation
The X11 queue_translation operation uses NextRequest to get the serial
of the XCopyArea operation where the translation should end. However,
if the gc passed to gdk_draw_drawable has a non-flushed clip region
(which it commonly has now for the window clipping) then the next
operation will be the GC flush, not the XCopyArea.

To handle this right we now pass in the GC to be used to
queue_translation and ensure that it is flushed before calling
NextRequest().
2009-08-13 14:46:02 +02:00
Alexander Larsson
5be3f38535 Move implicit grab tracking totally to common code 2009-04-02 10:15:30 +02:00
Alexander Larsson
36ce54878b Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call 2009-04-02 10:15:15 +02:00
Alexander Larsson
eabac453e6 Initial client-side-windows work
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.
2009-04-02 10:14:01 +02:00
Matthias Clasen
1cba7387ce Cache cursors to avoid libXcursor theme lookup overhead.
Patch by David Alan Gilbert.

        * gdk/gdkcursor.h: Add a GDK_BLANK_CURSOR cursor type.

        * gdk/x11/gdkcursor-x11.c: Cache font cursors and named cursors.

        * gdk/x11/gdkprivate-x11.h:
        * gdk/x11/gdkcdisplay-x11.c: Remove cached cursors when a
        display if finalized.


svn path=/trunk/; revision=22145
2009-01-20 02:15:59 +00:00
Emmanuele Bassi
e27632cd6d Abstract some GdkWindow API into an interface that the backends must
2008-06-27  Emmanuele Bassi  <ebassi@gnome.org>

	Abstract some GdkWindow API into an interface that the backends
	must implement. (based on a patch by Alex Larsson)

	* gdk/Makefile.am: Add gdkwindowimpl.[ch]

	* gdk/gdk.symbols: Move symbols around.

	* gdk/gdkinternals.h:
	* gdk/gdkwindowimpl.[ch]: Move some of the GdkWindow API we require
	from the backends to a GInterface that the backends should implement
	instead.

	* gdk/gdkwindow.c: Provide some of the GdkWindow public API as a
	wrapper call around the GdkWindowImpl interface vtable.

	* gdk/x11/gdkevents-x11.c:
	* gdk/x11/gdkgeometry-x11.c:
	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkwindow-x11.c:
	* gdk/x11/gdkwindow-x11.h: Update the X11 backend to implement
	the GdkWindowImpl interface.

svn path=/trunk/; revision=20695
2008-06-27 14:27:44 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
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
2008-06-22 14:28:52 +00:00
Michael Natterer
92f86e0496 gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h
2008-01-14  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h
	* gdk/gdkcairo.h
	* gdk/gdkcolor.h
	* gdk/gdkgc.h
	* gdk/gdkinternals.h
	* gdk/gdkregion.h
	* gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor*
	parameters const.

	* gdk/gdkcairo.c
	* gdk/gdkgc.c
	* gdk/gdkwindow.c
	* gdk/gdkrectangle.c
	* gdk/gdkpolyreg-generic.c
	* gdk/gdkregion-generic.c
	* gdk/directfb/gdkcolor-directfb.c
	* gdk/directfb/gdkgc-directfb.c
	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkcolor-quartz.c
	* gdk/quartz/gdkgc-quartz.c
	* gdk/quartz/gdkgeometry-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkgeometry-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkcolor-x11.c
	* gdk/x11/gdkgc-x11.c
	* gdk/x11/gdkgeometry-x11.c
	* gdk/x11/gdkmain-x11.c
	* gdk/x11/gdkprivate-x11.h
	* gdk/x11/gdkwindow-x11.c: changed accordingly.

	* gdk/gdkpolyreg-generic.c: uncruftify to have proper function
	headers.


svn path=/trunk/; revision=19365
2008-01-14 14:02:12 +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
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
Matthias Clasen
cd63ed1eb4 *** empty log message *** 2005-09-20 05:28:34 +00:00
Matthias Clasen
03aea1a3da Make it possible to determine if a key event is for a modifier key:
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	Make it possible to determine if a key event is for a
	modifier key:

 	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkkeys-x11.c (_gdk_keymap_key_is_modifier):
	New function to determine if a keycode is mapped to a modifier.
	(get_xkb): Get the modmap.

	* gdk/x11/gdkevents-x11.c (translate_key_event): Set the
	is_modifier bit by calling _gdk_keymap_key_is_modifier().

	* gdk/gdkevents.h (struct _GdkEventKey): Add an is_modifier
	bit.
2005-09-09 22:50:15 +00:00
Matthias Clasen
543ce67477 Add support for extra virtual modifiers: (#85780, Owen Taylor)
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	Add support for extra virtual modifiers:  (#85780, Owen Taylor)

	* gdk/x11/gdkkeys-x11.c (struct _GdkKeymapX11): Add a
	modmap to maintain the information which X modifiers map to
	virtual modifiers.
	(get_xkb): Set up the modmap from the XKB tables.
	(update_keymaps): Set up the modmap from the information returned
	by XGetModifierMapping in the non-XKB case.

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkkeys-x11.c (_gdk_keymap_add_virtual_modifiers): New
	function to set the virtual modifiers in the state.

	* gdk/x11/gdkevents-x11.c (translate_key_event): Call
	_gdk_keymap_add_virtual_modifiers here.

	* gdk/gdktypes.h (GdkModifierType): Add bits for virtual Super,
	Hyper and Meta modifiers. Also add GDK_ALT_MASK as an alias
	for GDK_MOD1_MASK.
2005-09-06 17:56:01 +00:00
Owen Taylor
8f3399d410 Change machinery for following font rendering xsettings to set cairo font
2005-07-19  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksettings.c gtk/gtkwidget.c: Change machinery for
        following font rendering xsettings to set cairo font
        options on PangoContext

        * gdk/x11/gdkxftdefaults.c gdk/x11/gdkevents-x11.c gdkscreen-x11.h
        gdkprivate-x11.h: Get default values for rendering options
        (such as antialiasing, dpi) from the Xft resources for the
        display, borrowing a bit of code from Xft.

        * gtk/gtksettings.c (gtk_settings_class_init): Fix docs for
        values of gtk-xft-hintstyle.
2005-07-21 13:59:22 +00:00
Manish Singh
5cc0696de6 declare _gdk_xgrab_check_button_event.
Thu Jun 30 14:17:24 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkprivate-x11.h: declare _gdk_xgrab_check_button_event.

        * gtk/gtkbutton.c: fix signature of gtk_button_grab_broken.
2005-06-30 21:18:34 +00:00
Matthias Clasen
beb73ece8f Handle cursor theme changes for cached cursors which are not associated
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkcursor-x11.c: Handle cursor theme changes
	for cached cursors which are not associated with a window
	at the time of the theme change, by storing a serial
	number in each cursor, and updating the theme_serial
	counter whenever the cursor theme changes.

	* gdk/x11/gdkcursor-x11.c (_gdk_x11_cursor_update_theme):
	Private function to update a cursor to the current
	cursor theme if necessary.

	* gdk/x11/gdkmain-x11.c (gdk_pointer_grab):
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_cursor): Call
	_gdk_x11_cursor_update_theme() here.
2005-06-17 17:26:24 +00:00
Matthias Clasen
2fad80a6bd Forgotten file 2005-06-14 16:05:52 +00:00
Owen Taylor
788bbf520a Add a draw-border style property to allow themes to draw outside the
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-05-02 23:29:24 +00:00
Owen Taylor
09d7eafb15 Switch set_cairo_target() virtual function to ref_cairo_surface()
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-17 01:54:40 +00:00
Matthias Clasen
014a347f00 Avoid X errors when running against servers which implement XRender < 0.4.
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.
2005-01-18 15:19:53 +00:00
Owen Taylor
3d737ee8ba Add GdkPangoRenderer, a subclass of PangoRenderer targeting GDK drawables.
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)
2004-11-21 16:24:01 +00:00
Soeren Sandmann
6c8430c0c4 Fix for #119722, reported by Olexiy Avramchenko, patch by Owen Taylor.
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.
2004-02-17 22:05:47 +00:00
Matthias Clasen
1014c413c5 Rename from _gdk_x11_register_event_type(), added API docs.
Sun Dec 14 01:28:23 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkevents-x11.c (gdk_x11_register_standard_event_type):
	Rename from _gdk_x11_register_event_type(), added API docs.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_init):
	* gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init): Adjust
	all callers.  (#121471, Bill Haneman)
2003-12-14 00:28:57 +00:00
Owen Taylor
88c1c94651 Requires glib-2.3.0, pango-1.2.0.
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.
2003-08-02 17:50:09 +00:00
Owen Taylor
50da0ae808 gdk/x11/gdkevents-x11.c (get_real_window) gdk/x11/gdkinput-x11.c
Tue Jul  8 20:11:04 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (get_real_window)
        gdk/x11/gdkinput-x11.c (_gdk_input_common_init)
        gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init)
        gdk/x11/gdkprivate-x11.h (_gdk_windowing_image_init)
        Don't assume that all events start with XEventAny - Xkb events
        don't! (#105745). So, only do that for core events, and for
        non-core events, add a system for registering event types
        that start with XEventAny.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate):
        Check to see if the result of gdk_window_lookup_for_display()
        is actually a window.
2003-07-11 19:57:01 +00:00
Owen Taylor
9bedbf662d Use asynchronously _gdk_x11_set_input_focus_safe to avoid having to trap
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.
2003-07-05 01:54:05 +00:00
Owen Taylor
76fc08a3fc Keep track of when we have a clip mask set for the GC, and when we unset
Wed Jun  4 19:24:28 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Keep
        track of when we have a clip mask set for the GC,
        and when we unset it, or switch to a clip region,
        immediately call XSetClipMask (..., None) to avoid
        Xlib caching stale data. (#111806)

        * gtk/gtktextdisplay.c: Don't set a clip mask
        when drawing alpha pixmaps; it isn't necessary any more.
        (#111806)
2003-06-04 23:26:52 +00:00
Owen Taylor
f9d267ae80 Delete unused private gdk_visual_lookup(), make gdk_colormap_lookup()
Tue Sep 24 16:04:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
        gdkwindow-x11.c: Delete unused private gdk_visual_lookup(),
        make gdk_colormap_lookup() private gdkcolor-x11.c.
        make gdk_window_add_colormap_windows private to gdkwindow-x11.c
        (#85674)

        * gdk/x11/gdkx.h gdk/x11/gdkcolor-x11.c
        gdkscreen-x11.h: Add gdk_x11_colormap_foreign_new(),
        GDK_ENABLE_BROKEN gdkx_colormap_get(), make the
        colormap hash per-screen. (#85697)

        * gdk/x11/gdkxid.c (gdk_xid_table_lookup_for_display):
        Remove a bit of unecessary code.
2002-09-24 20:20:08 +00:00
Owen Taylor
a16b63eb35 Add a keys_changed signal emitted when the keymap changes. (#72148)
Mon Sep 23 16:48:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkkeys.[ch] gdk/x11/gdkkeys-x11.c gdk/x11/gdkevents-x11.c:
        Add a keys_changed signal emitted when the keymap changes.
        (#72148)

        * gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry):
        Hook up code to handle keymap changes, change to keep
        a linked list of keymap entries so that we can reinsert
        them in the same order on a keymap change.
2002-09-23 21:35:00 +00:00