Commit Graph

3325 Commits

Author SHA1 Message Date
Benjamin Otte
bf395263b2 gdk: Use the correct surface size when creating surfaces
Previously we used the size of the csw window, which could easily be
huge and cause CAIRO_SURFACE_INVALID_SIZE errors. If we use the real
size, we work around this problem. The surface can now potentially be
bigger than before but we should handle that when clipping in csw.

https://bugzilla.gnome.org/show_bug.cgi?id=633701
2010-11-08 16:14:14 -05:00
Hans Breuer
1050485a13 Prefer MessageBeep() over Beep()
Only the former respects the sound volume setting. If MessageBeep() fails fall back to the latter.
(cherry picked from commit 5e59db1554)
2010-11-07 22:38:20 +01:00
Kristian Rietveld
15eecb1645 quartz: release pattern in GC finalize 2010-10-24 14:39:52 +02:00
Kristian Rietveld
dfd7e05123 quartz: Reset drawable on pattern callback info when gc is updated 2010-10-24 14:39:52 +02:00
Kristian Rietveld
b0a17e5a37 Pass pixmap to _gdk_pixmap_get_cgimage() and not the impl 2010-10-24 14:39:52 +02:00
Kristian Rietveld
f62b56194b quartz: Always use generic color space
Switch all usage of device color spaces to generic color spaces.  Since
the former color spaces are no longer device-dependent as of Mac OS X
10.4, these yielded a very costly color space conversion when drawing
pixmaps to the screen.  We now avoid this by using the generic color
space.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624025
2010-10-19 10:41:01 +02:00
Kristian Rietveld
e6e9eef855 Rework GdkPixmapImplQuartz to create CGImage on-demand
If the data that backs a bitmap context changes, then the CGImage that
is backed by this data might not always update due to caching effects.
By creating the CGImage on-demand, we ascertain ourselves that the
CGImage is up to date.
2010-10-19 10:40:48 +02:00
Matthias Clasen
0200763126 Fix header inclusions for !srcdir builds 2010-10-16 16:53:44 -04:00
Christian Persch
2a646c1d21 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-16 01:11:43 -04:00
Javier Jardón
463e6843b9 docs: Fix some docs in gdkrgb
Reported by Milan Bouchet-Valat in
https://bugzilla.gnome.org/show_bug.cgi?id=631473
2010-10-06 01:00:35 +02:00
Matthias Clasen
d1f256ac30 Backport some new GdkWindow api from 2.90
This commit adds
gdk_window_get_display
gdk_window_get_screen
gdk_window_get_visual
gdk_window_get_width
gdk_window_get_height
and deprecates the corresponding GdkDrawable APIs.
This will make it easier to prepare the port to GTK+ 3
2010-09-27 20:37:03 -04:00
Matthias Clasen
2e5251b405 Add gdk_cairo_set_source_window
And deprecate gdk_cairo_set_source_pixmap.
2010-09-27 19:00:10 -04:00
Colin Walters
62c2b4f529 introspection: Only use 0.9.3 API 2010-09-20 10:00:30 -04:00
Matthias Clasen
4850fa57f9 Fix up a botched cherry-pick 2010-09-17 11:05:42 -04:00
Matthias Clasen
0ebde0bbe5 Fix a doc comment
(cherry picked from commit 28c66ed9b0)
2010-09-17 09:49:54 -04:00
Matthias Clasen
a3fa516c60 Scan gdk/x11 sources for Gdk-3.0.gir
The doc comments (with annotations) for some of the gdk api are down
in x11/ sources, so we need to scan those too, when building Gdk-3.0.gir.
2010-09-17 09:49:19 -04:00
Matthias Clasen
27970efd52 Add annotations
The goi scanner warns about these nowadays.
(cherry picked from commit 6aa8941b84)
2010-09-17 09:47:47 -04:00
Sebastian Dröge
285ab04c0c gdk: Only use XComposite if it is available
Fixes build if it isn't available. Bug #629748.
2010-09-15 16:41:41 +02:00
Matthias Clasen
4394a972dc Fix a logic error in the gdk_display deprecation 2010-09-13 13:14:18 -04:00
Adel Gadllah
81ec8c7a1b [GdkWindowCache] Don't ignore the CompositeOverlayWindow
Add the composite overlay window to the cache, as this can be a reasonable Xdnd proxy as well.

This is only done when the screen is composited in order to avoid mapping
the COW. We assume that the CM is using the COW (which is true for pretty
much any CM currently in use).

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2010-09-13 18:21:15 +02:00
Matthias Clasen
9190497b4a Don't use g_idle_add to schedule idles in GDK
We need to use gdk_threads_add_idle, in order to keep GDK code
under the GDK lock.

Bug 629277
(cherry picked from commit 08dd02fe25)
2010-09-10 22:35:36 -04:00
Matthias Clasen
a3c3031a0e Deprecate gdk_display and GDK_DISPLAY 2010-09-10 22:33:58 -04:00
Tor Lillqvist
88f54ea47d Avoid potential DLL hijacking in Wintab code
Load Wintab32.dll from an absolute path. A proper Wintab32.dll, if
present, should be in the Windows system directory, so load it from
there.
2010-09-09 20:21:03 +03:00
Colin Walters
750c81f43d gdk: Prefix keys with _KEY by default
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.  In GTK2, this header is included by default.

https://bugzilla.gnome.org/show_bug.cgi?id=629093
2010-09-08 19:07:23 -04:00
Colin Walters
ae84810db5 gdk: Update gdkkeysyms.h
In preparation for adding a namespace prefix for introspection.
2010-09-08 18:56:59 -04:00
Colin Walters
8e75ddeac6 introspection: Update to new scanner API
* Add --warn-all
* Drop unnecessary  of --strip-prefix; for GdkX11, use --symbol-prefix

https://bugzilla.gnome.org/show_bug.cgi?id=628160

Conflicts:

	configure.in
	gdk/Makefile.am
	gtk/Makefile.am
2010-09-08 11:13:12 -04:00
Matthias Clasen
bcdd895229 Avoid segfault on xkbless systems
This was reported in bug 628932 to cause problems on VNC.
(cherry picked from commit d5c2cb7bcb)
2010-09-07 00:11:55 -04:00
Benjamin Otte
ba5ba3b022 gdk: Ensure flush of surface when cairo_t is destroyed
Add an ugly workaround because GTK does not ensure surfaces get flushed
before directly accessing the drawable backed by the surface. This is
not visible on X11 (where flushing is a no-op), but can be seen on
Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=628291
2010-09-07 02:42:27 +02:00
Neil Roberts
c3c5575fc1 Initialize more attributes in gdk_window_ensure_native
The attributes struct has some members that aren't covered by the
attributes_mask so they should always be filled in. The Win32 backend
was using the window type member when creating the window
implementation. Previously this was left uninitialized so it would end
up thinking the window is input_only and nothing would get painted.

https://bugzilla.gnome.org/show_bug.cgi?id=628049

Signed-off-by: Hans Breuer <hans@breuer.org>
2010-09-05 16:01:23 +02:00
Matthew Barnes
1175e6b98c Don't leak display name
Bug 628656 - _gdk_windowing_get_startup_notify_id memory leak

get_display_name() returns a newly allocated string, which was being fed
directory info a g_strdup_printf() call.
(cherry picked from commit bf3b5f785e)
2010-09-03 12:51:24 -04:00
Tor Lillqvist
027380d33e Just use TrackMouseEvent directly
TrackMouseEvent is present in user32.dll in all Windows versions we
support. No need to look it up dynamically. No need to fallback to
_TrackMouseEvent from comctrl32.dll.
2010-09-03 00:49:02 +03:00
Lionel Landwerlin
30a52271e5 directfb: implement draw_drawable_with_src instead of draw_drawable in GdkDrawableImplDirectFB
This is required by the rotated button test in gtk-demo

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
b7b9a01efb TOFINISH: fixes on clear/scrolling
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
4509240d0e directfb: fix gdk_directfb_child_at
When GDK looks for the window under pointer, the gdk-directfb backend
looks at windows starting from the root window to the upper window in
the stack. For this, it looks at window's size and position. This
patch fix the assumption that windows are always natives windows from
which we can retrieve backend's private data.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
65f7b09b39 directfb: fix GdkPixmap creation
Since GDK has introduced the offscreen window concept, pixmap can be
created using drawables which aren't native windows. This patch fix
this assumption.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
8e958f58c9 directfb: remove useless cairo_surface cleanup
This is done by gdk_directfb_cairo_surface_destroy via cairo_surface_set_user_data.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
333d53b342 directfb: remove useless code manipulating window's private data
The window management code used to deal with gdk internals. It seems a
lot of code has been pushed to the generic gdk code, so we remove
useless code.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
737f035959 directfb: rework backend initialization a little bit
Make it look more like the x11 backend. Also some people reported
crash early in the backend initialization about some colormap stuff,
this should avoid the problem.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
2970d775ed directfb: get rid of useless gdkWindow reference in GdkWindowImplDirectFB
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
5538315d38 directfb: event manager rewrite
The event translation code used to deal a lot with gdk internals. It
seems a lot of code has been pushed to the generic gdk code, so we
needed to rewrite the things a little bit.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
ecb7734660 directfb: split gdk_directfb_event_make function
In prevision of coming event manager rewrite.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
9de2f4b9cc directfb: get rid of abs_x,abs_y computation within the backend
The computation of abs_x,abs_y is done by the generic code of GDK when
events are raised. We don't care about that anymore.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:21 +02:00
Lionel Landwerlin
68ba791720 directfb: use boilerplate macros for GdkWindow
This patch reduce boilerplate for GdkWindowImplDirectFB using G_DEFINE_TYPE macro.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Lionel Landwerlin
4e9be0c9e9 directfb: use boilerplate macros for GdkPixmap
This patch reduce boilerplate for GdkPixmapImplDirectFB using G_DEFINE_TYPE macro.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Lionel Landwerlin
000b2fa22b directfb: use boilerplate macros for GdkImage
This patch reduce boilerplate for GdkImage using G_DEFINE_TYPE macro.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Lionel Landwerlin
59d6e84459 directfb: drop cairo < 1.6 dependency
This removes the cairo's versions checks < 1.6 since GTK+ now requires
cairo >= 1.6.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Lionel Landwerlin
f8d42326ea directfb: coding style coherency
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Lionel Landwerlin
3c3aa2778b directfb: add missing symbols for gdk input 2.22
Also make it look more like the x11 backend.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Lionel Landwerlin
8637b3eb37 directfb: drop internal reference to gdk-pixbuf
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2010-08-31 21:08:20 +02:00
Matthias Clasen
4e2ade8d6b Make gdk_keymap_map_virtual_modifiers work early
It needs to ensure that we have an uptodate modmap. Bug 616401
(cherry picked from commit d5a8a3c9bc)
2010-08-30 12:52:40 -04:00