Commit Graph

1353 Commits

Author SHA1 Message Date
Michael Natterer
a1134e5622 gdk: change signature of gdk_device_get_history() back to what it used to be
"n_events" went back from guint to gint.
2010-10-19 13:30:42 +02:00
Benjamin Otte
e0d7da3c8c x11: Set GDK_PIXBUF_ENABLE_BACKEND before including files
Otherwise we get an undefined gdk_pixbuf_set_option().
2010-10-18 19:22:43 +02:00
Ryan Lortie
8cca398a2f Gdk X11: Add setter for startup notify ID
For launch requests coming in over DBus.
2010-10-18 17:21:22 +02:00
Christian Persch
b5621b3c89 Take cursor hotspot from pixbuf if available
Allow -1 for the hotspot coordinates in gdk_cursor_new_from_pixbuf,
if the pixbuf contains the x_hot/y_hot options with appropriate values.

Bug #632140.
2010-10-15 14:38:21 -04:00
Benjamin Otte
22d28ef47d x11: Don't set ParentRelative if the parent's visual is different
It's like 82e6e32c, but when a pattern is given as argument.

https://bugzilla.gnome.org/show_bug.cgi?id=632218
2010-10-15 17:10:05 +02:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Matthias Clasen
88ef199ed7 Inclusion cleanups in headers 2010-10-14 22:08:53 -04:00
Matthias Clasen
e613d26448 Drop dead gxid_proto.h header
This header is no longer used.
2010-10-14 22:08:26 -04:00
John Ralls
c3851df92d Replace GDK_Tab and GDK_ISO_Left_Tab with GDK_KEY equivalents
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=631475

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-10-06 01:20:29 +02:00
Kristian Rietveld
eca2af5230 Make set_cairo_surface_size a vfunc on GdkWindowImpl
Note the special implementation of this method on GdkOffscreenWindow
that makes sure its current surface is not destroyed.
2010-10-05 15:38:23 +02: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
Matthias Clasen
448d903c16 GDK docs: improve the gdk_x11_display_error_trap_push docs 2010-10-01 08:16:38 -04:00
Benjamin Otte
82e6e32c77 x11: Don't set ParentRealtive if the parent's visual is different
Causes a BadMatch otherwise, see code comments.

https://bugzilla.gnome.org/show_bug.cgi?id=630864
2010-09-29 12:18:17 +02:00
Benjamin Otte
f0d337a0ca x11: Fix debug code
With recent changes, nobody compiled with debug enabled. Fix that.
2010-09-27 17:39:51 +02:00
Benjamin Otte
e8e657725c x11: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:43 +02:00
Benjamin Otte
5625c20759 x11: When querying window size, ask the wrapper, not ourselves 2010-09-26 15:11:41 +02:00
Benjamin Otte
e624656c20 API: Remove GdkColormap 2010-09-26 15:11:34 +02:00
Benjamin Otte
cf4cb4f6d9 API: Remove colormap handling from GdkScreen
In particular, the following functions are gone:
- gdk_screen_get_default_colormap()
- gdk_screen_set_default_colormap()
- gdk_screen_get_system_colormap()
- gdk_screen_get_rgba_colormap()
2010-09-26 15:11:34 +02:00
Benjamin Otte
04d5c477aa API: Remove gdk_drawable_get_colormap()
And with it, remove any notion of colormaps from GdkWindow. In
particular, X11 windows will now not set attrs.colormap when calling
XCreateWindow.
2010-09-26 15:11:33 +02: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
571e749d60 x11: Set background color bypassing colormaps
Direct and TrueColor visuals don't alloc colors, so they don't need to
fiddle with colormaps. Just copy the code that computes the pixel value
from gdkcolor-x11.c and use it. For other visual types, don't set the
background color and fallback to background = None.
2010-09-26 15:11:33 +02:00
Benjamin Otte
f08254074c API: Remove colormap member from GdkWindowAttr
Also remove all code that cares about differing colormaps for child
windows.
2010-09-26 15:11:33 +02:00
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
0f13411cb0 x11: Use gdk_window_get_screen() in the testutils 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6ef356107 API: Remove drawable getters for visual, screen and depth
Removed and replaced are:
gdk_drawable_get_visual() => gdk_window_get_visual()
gdk_drawable_get_screen() => gdk_window_get_screen()
gdk_drawable_get_depth()  => gdk_visual_get_depth
                                          (gdk_window_get_visual())
2010-09-26 15:11:33 +02:00
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
eee6c002d1 gdk: store the visual in the GdkWindowObject 2010-09-26 15:11:32 +02:00
Benjamin Otte
894d402c0f API: Remove gdk_drawable_set_colormap() 2010-09-26 15:11:32 +02:00
Benjamin Otte
a520b4f372 x11: Remove some unused macros 2010-09-26 15:11:31 +02:00
Benjamin Otte
a7208d675f x11: s/GDK_DRAWABLE_DISPLAY/GDK_WINDOW_DISPLAY 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
9bcbdb7494 x11: Create blank cursor without pixmaps 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
Benjamin Otte
8d3319f088 x11: Remove last traces of XShm
Since deletion of GdkImage, shm is no longer in use.
2010-09-26 15:11:30 +02:00
Benjamin Otte
2b4efe2690 x11: Remove _gdk_x11_convert_to_format()
It's unused now.
2010-09-26 15:11:30 +02:00
Benjamin Otte
47292f28d5 x11: Upload cursor image using Cairo
There's no need to write our own upload function when the cursor format
is identical to CAIRO_FORMAT_ARGB32.
2010-09-26 15:11:30 +02:00
Benjamin Otte
6453710266 x11: Set the icon using Cairo
No more GdkPixmap to store the icon and its mask, but instead use cairo
surfaces. Also render the icon into the surfaces using Cairo instead of
gdk_pixbuf_render_threshold_alpha().
2010-09-26 15:11:29 +02:00
Benjamin Otte
2bedd205c5 gdk: Remove gdk_windowing_create_cairo_surface()
Instead, actually use the create_cairo_surface vfunc on the
implementation drawable. D'oh.
2010-09-26 15:11:11 +02:00
Benjamin Otte
2c1633699f gdk: Rewrite background handling
Now the window background is a cairo_pattern_t. The backends will try to
set this as good as they can on the windowing system, but no guarantees
are made on wether the windowing system supports the pattern.

Also gets rid of GDK_NO_BG as undefined behavior is not a good idea to
support, and GDK_NO_BG effectively made the window's contents undefined.
It wasn't effectively used in GTK anyway.
2010-09-26 15:03:00 +02:00
Benjamin Otte
c250b3fe1d gdk: Remove supports_native_bg on WindowImplIface
This will not be TRUE for anything anymore, once we fix background
handling.
2010-09-26 15:03:00 +02:00
Benjamin Otte
547e2cc837 gdk: Remove GdkWindowImpl->clear_region
It was only used on the X11 backend and is easier to implement locally,
in particular when we want to allow backgrounds that X can't handle.
2010-09-26 15:03:00 +02:00
Benjamin Otte
bfa6ad6e7c gdk: Remove _gdk_windowing_get_shape_for_mask()
It's unused. And there's a replacement available with
gdk_cairo_region_create_from_surface()
2010-09-26 15:02:59 +02:00
Benjamin Otte
6218c16ff8 API: Remove gdk_cursor_new_from_pixmap()
gdk_cursor_new_from_pixbuf() is the proper replacement.
2010-09-26 15:02:59 +02:00
Benjamin Otte
6ef27387e0 API: remove gdk_window_set_icon()
gdk_window_set_icon_list() now does everything gdk_window_set_icon()
used to do.
2010-09-26 15:02:59 +02:00
Benjamin Otte
241f38992b x11: remove icon_window property, it's not used anymore 2010-09-26 15:02:59 +02:00
Benjamin Otte
c65bb2b3b4 x11: Set icon based on icon list
Basically copies the code for setting the WM icon hint from GtkWindow to
GdkWindow. This achieves the following:
- Putting this X11 specific code into the X11 backend
- Enables removal of gdk_window_set_icon()
- Gets rid of Pixmap/Bitmap usage outside of GDK.
2010-09-26 15:02:59 +02:00
Javier Jardón
9c3d1080d6 Do not use deprecated gdk_display_get_core_pointer()
Use gdk_device_manager_get_client_pointer() instead
2010-09-22 03:42:15 +02:00
Matthias Clasen
59bc9e8860 Fix an off-by-one error in serial range handling
trap->end_sequence is the first serial for which we don't
ignore errors anymore, so we know the trap is dead if
end_sequence <= processed_serial.

Bug 629608
2010-09-21 21:10:15 -04:00