Commit Graph

3406 Commits

Author SHA1 Message Date
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
Philip Withnall
818ef9aaf6 Miscellaneous string fixes
Mostly capitalisation fixes. Closes: bgo#528257
2010-08-29 19:05:26 +01:00
Fridrich Štrba
895b9ff43f A proper fix for win32 build 2010-08-29 18:16:58 +02:00
Fridrich Štrba
af44019baf Revert "Fix windows build of the branch"
This reverts commit c7e650ae5d.
2010-08-29 18:16:19 +02:00
Hans Breuer
17269e6c1d win32: Fix a bunch of c99isms
With c89 (which msvc implements) variables still need to be
declared at the beginning of a block.
2010-08-29 14:31:06 +02:00
Hans Breuer
707f1a9a84 win32: Further fixing _gdk_window_impl_new()
- attributes->wclass is not consistently set anymore,
   use private->input_only instead [1]
 - don't put window into parent->children a second time
   (now there is no window reference problem anymore)
2010-08-29 14:22:08 +02:00
Fridrich Štrba
c7e650ae5d Fix windows build of the branch 2010-08-28 18:50:45 +02:00
Martin Schlemmer
770e308c42 win32: cummulated backport of xp theme fixes from master 2010-08-28 15:14:31 +02:00
Hans Breuer
e339d36a02 win32: Resurrect some enter/leave notify events for native windows
The button highlighting in testgtk works again, even with
GDK_NATIVE_WINDOWS. Unfortunately testgtk:menus still does
not work for the forced-native-window-case.
2010-08-27 21:29:33 +02:00
Hans Breuer
068515ad96 Further fix _gdk_window_impl_new() for win32 and ...
Beside fixing _gdk_window_impl_new() as adviced in
http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00214.html
the patch adds implementations for set_background, set_back_pixmap,
restack_under, restack_toplevel and clear_region methods.
2010-08-27 21:23:59 +02:00
Neil Roberts
2e08524481 win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos
In _gdk_window_move_resize_child it tries to decide whether to pass
SWP_NOSIZE and SWP_NOMOVE based on whether the new size and position
is different from the window's existing position. However it seems
that GDK now ends up updating the window's position before calling
_gdk_window_move_resize_child so this would mean it would think the
window never changes size or position so SWP_NOSIZE|SWP_NOMOVE would
always be set. This causes child windows to never be resized.

This patch changes it so that it never passes either flag to
SetWindowPos. I don't know whether this will cause any side effects
but you'd think it shouldn't do any harm to reassert the current size.

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

Signed-off-by: Hans Breuer <hans@breuer.org>
2010-08-27 20:38:01 +02:00
Hans Breuer
0e781823cb Update mscv/win32 build
Fix makefiles for separated gdk-pixbuf and declare variable at
the beginning of a block (fix c99ism).
2010-08-27 20:34:23 +02:00
Matthias Clasen
1d5a6e790a Fix up some documentation issues 2010-08-16 17:38:23 -04:00
Benjamin Otte
9f1cb0798b API: Add gdk_window_get_background_pattern()
This is the suggested way for GTK3 to store a Window's background so it
makes sense to use the same function today already.
2010-08-16 20:01:49 +02:00
Kristian Rietveld
77b703c2fc quartz: stop offscreen windows code from crashing.
This is an adapted version of commit
bde0f9a8f6 on master.

Mainly fixes to properly differentiate bewteen toplevel and offscreen
windows, since these sometimes need different treatment.  Furthermore,
usage of gdk_window_get_effective_foo() instead of gdk_window_get_foo()
where applicable.

There is an drawing issue left when scrolling e.g. tree views in
offscreen windows.  I think this is likely an issue with
gdk_quartz_draw_drawable() which is used for the copy area code in
offscreen windows.  It works fine in master, since this was converted
to Cairo.
2010-08-15 17:34:33 +02:00
Benjamin Otte
370dfc16ca Remove window background getters again
They were added as accessors for 2.22 even though querying the
background wasn't possible previously. As GTK 3.0 will change background
handling, it doesn't make sense at all to expose these getters.
2010-08-15 03:31:37 +02:00
Benjamin Otte
997d3aada6 API: Add gdk_window_create_similar_surface() 2010-08-12 23:30:19 +02:00
Benjamin Otte
0e183fe745 pixmap: Deprecate create_from_data() constructors
And document that GdkPixmap will go away in GTK 3.
2010-08-12 03:02:38 +02:00
Benjamin Otte
cedf52fb81 x11: Deprecate GdkGC functions
They are gone in GTK3, just like the rest of GdkGC.
2010-08-12 01:54:58 +02:00
Benjamin Otte
e8915ae422 gdk: Undeprecate gdk_region_xor()
cairo_region_xor() does now exist, so there's no need to deprecate this
function.
2010-08-10 18:26:12 +02:00
Benjamin Otte
bff0d11c4d gdk: Deprecate GdkRGB functions 2010-08-08 02:59:21 +02:00
Benjamin Otte
a907d5e2cc Deprecate all of GdkImage 2010-08-07 22:17:43 +02:00
Benjamin Otte
8a2a736af4 Deprecated all GdkGC functions 2010-08-07 22:08:21 +02:00
Benjamin Otte
3d506df234 gdk: Deprecate all drawing functions
These functions will be gone in Gtk 3.0 and be replaced by Cairo
functions.

Includes not disabling deprecated functions in old widgets that aren't
going to be ported.
2010-08-07 15:35:51 +02:00
Benjamin Otte
f36bb4d91d gdk: Simplify deprecation guards in gdkdrawable.h 2010-08-07 15:35:49 +02:00
John Stowers
32c4f471d5 Add gdk_display_is_closed
https://bugzilla.gnome.org/show_bug.cgi?id=624224
2010-08-07 23:11:42 +12:00
Tomeu Vizoso
23f7d3a0ea Annotate gdk_rectangle_intersect 2010-07-28 16:53:14 +02:00
Tomeu Vizoso
fd75ced492 Generate GdkX11-2.0.typelib (backported from HEAD)
https://bugzilla.gnome.org/show_bug.cgi?id=625491
2010-07-28 15:03:28 +02:00
Benjamin Otte
01fea4032f gdk: Revert making get_size optional
49a0ec6e95 added this hunk without
explanations and it's obviously wrong because failing to have a get_size
vfunc will now not set width and height and they'll end up with invalid
values.

In fact, the GdkDrawableImpl{X11,Win32,Quartz} functions do not have
get_size implemented, so the patch was most likely an attempt to work
around calling this function erroneously on the impl objects.

The correct fix is to call impl->wrapper instead.
2010-07-26 11:58:23 +02:00
Benjamin Otte
e1c7ff8ee0 x11: Query size on real drawable
The X11 drawable does not have a clue about the real size of the
surface.

This might also be the cause for:
https://bugzilla.gnome.org/show_bug.cgi?id=599574
2010-07-26 11:58:23 +02:00
Emmanuele Bassi
7a68f42d2e Do not return values from a function returning void 2010-07-26 11:58:23 +02:00
John Stowers
dc2fea413b Add gdk_device_get_n_axes
https://bugzilla.gnome.org/show_bug.cgi?id=624221
2010-07-25 12:32:43 +12:00
John Stowers
6c25cf872f Add gdk_cursor_get_cursor_type
https://bugzilla.gnome.org/show_bug.cgi?id=624087
2010-07-25 12:32:38 +12:00
Tomeu Vizoso
10ebcedf56 Annotate gdk_display_manager_list_displays return value
https://bugzilla.gnome.org/show_bug.cgi?id=623307
(cherry picked from commit eae60c34d2)
2010-07-12 12:28:48 -04:00
Javier Jardón
6de36e580b [gdk] Add gdk_window_has_native() function
https://bugzilla.gnome.org/show_bug.cgi?id=622677
2010-07-01 02:39:39 +02:00
Benjamin Otte
807c14741f Deprecate GdkRegion symbols that have no Cairo equivalent
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-30 16:25:03 +02:00
Philip Withnall
b89dcab5a5 Add allow-none to gdk_window_set_cursor() 2010-06-27 19:20:54 +01:00
Kristian Rietveld
e634f3fbe0 Move Leopard-specific type definitions to gdkquartz.h
Update includes subsequently where it matters.  Fixes build on Mac OS
X 10.4.
2010-06-27 10:41:15 +02:00
Kristian Rietveld
3770d914ec Refactor to use API that's available in OS X 10.4 as well 2010-06-27 10:41:15 +02:00
John Ralls
093a867e51 Bug 622333 - Crash in gdk_window_impl_quartz_begin_paint_region 2010-06-27 10:41:15 +02:00
Kristian Rietveld
9f5f47f8be Flip clip mask image when setting clip mask on GC 2010-06-27 10:41:15 +02:00
Kristian Rietveld
49f72c1fb4 Rework color translation to support gray scale and bitmaps 2010-06-27 10:41:15 +02:00
Kristian Rietveld
42d07ad6ce Add gray visual, implement "get_best" functions 2010-06-27 10:41:15 +02:00
Matthias Clasen
cbf303d8c6 Add an accessor for GdkImage->mem
See bug # 522756
(cherry picked from commit 53796b7f1f)
2010-06-26 17:00:39 -04:00
Matthias Clasen
cb29d27707 Make GTK+ build against an external gdk-pixbuf 2010-06-26 02:29:29 -04:00
Javier Jardón
7d6d1af7a1 [docs] Fix annotations: "(allow-none): (out)" -> "(out) (allow-none)" 2010-06-24 18:13:17 +02:00
Tor Lillqvist
bba451147b Generate correct grab broken event for WM_KILLFOCUS
WM_KILLFOCUS means that a keyboard grab (not a pointer grab), if any,
has been broken. I don't think this bug has matterd much as gtk
generates a grab-broken-event signal for both keybord and pointer
grabs being broken anyway.
2010-06-22 21:32:05 +03:00
Yaakov Selkowitz
6922490fa5 Do not dist gir_DATA
GIR files contain a shared-library attribute which varies per platform,
and therefore must not be disted; see bug 621611 for rationale.

https://bugzilla.gnome.org/show_bug.cgi?id=621719
2010-06-20 08:26:26 +02:00
Cosimo Cecchi
b5fdb45259 Add a missing accessor for GdkDragContext->source_window. 2010-06-10 16:12:34 +02:00
Michael Natterer
e494ec1d61 gdk: fix typo in the docs for gdk_drag_context_get_selected_action() 2010-06-10 13:15:12 +02:00
Hib Eris
070afc587c [gdk/win32] Fix typo 2010-06-08 15:46:05 +02:00
Steve Frécinaux
d3adde0116 [gdkevents] Add annotations for GdkEvent getters. 2010-06-08 00:05:58 +02:00
Matthias Clasen
d780a23746 Silence a few warnings in !HAVE_RANDR builds
(cherry picked from commit b96a05b81f)
2010-06-04 15:47:42 -04:00
Colin Walters
c8262d39fa Use g_source_set_name for all custom GSources in GTK+
Naming the sources allows easier debugging with e.g. SystemTap
probes.

https://bugzilla.gnome.org/show_bug.cgi?id=620511
2010-06-03 21:32:06 -04:00
Michael Natterer
22c61e0c8f app: forgot to update API docs in the last commit 2010-06-02 21:11:45 +02:00
Michael Natterer
d393cb377c gdk: rename gdk_drag_context_get_action() to gdk_drag_context_get_selected_action()
so its purpose is clear.
2010-06-02 20:42:11 +02:00
Didier Roche
8a6f6b5421 Fix fail to build when building with introspection
In debian/ubuntu, builddir != srcdir. This trigger an error on
introspection_files where srcdir is added to x11/*.c. Indeed,
srcdir is added again later: $(addprefix $(srcdir)/,$(introspection_files))
making $(srcdir)/$(srcdir)/x11/*.c (not an issue on jhbuild as srcdir = .)
2010-06-02 18:25:12 +02:00
Cody Russell
6c0ff288b0 Bug 608218 - GtkOffscreenWindow causes bad window with GtkEntry
We now exit early from gdk_window_register_dnd() to avoid crashing if the
window type is GDK_WINDOW_OFFSCREEN and does not support dnd operations.
This makes it possible to use any dnd-enabled widgets, such as GtkEntry,
within a GtkOffscreenWindow.
2010-06-01 18:46:38 -05:00
Sebastian Dröge
39f3d5e182 Don't include __bss_start, _edata and _end symbols in the abichecks
They are added by the binutils gold linker.
2010-05-30 02:26:32 -04:00
Tor Lillqvist
97015c226f Don't use g_drag_context_ref
(cherry picked from commit a709056140)
2010-05-30 02:23:03 -04:00
Javier Jardón
cfb988ab38 Seal gdk
Add G_SEAL annotation for struct members, and add accessors for
the (useful) fields. Patch based on work by Garrett Regier,
see bug #592580.
2010-05-27 16:25:54 +02:00
Benjamin Otte
6c7dc26935 Revert "Implement GdkRegion in terms of cairo_region_t"
This reverts commit 5616bdc3dc.

I always thought cairo_region_t was a Cairo 1.8 feature. Apparently it
isn't, so the 3 patches I just reverted made Gtk depend on an unreleased
Cairo version. This is obviously not a good thing.

Expect those patches to reland once there's a Cairo 1.10 out (probably
around Gtk 4...)
2010-05-26 09:25:55 +02:00
Benjamin Otte
863853ec5f Revert "Remove _gdk_region_new_from_yxbanded_rects()"
This reverts commit dde9cf2882.
2010-05-26 09:25:44 +02:00
Benjamin Otte
fd20ac0751 Revert "Deprecate the GdkRegion API"
This reverts commit 821dd33918.
2010-05-26 09:25:35 +02:00
Benjamin Otte
821dd33918 Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-05-23 23:27:15 +02:00
Benjamin Otte
dde9cf2882 Remove _gdk_region_new_from_yxbanded_rects()
It was an internal function and we can use
cairo_region_create_rectangles() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-05-23 23:20:30 +02:00
Benjamin Otte
5616bdc3dc Implement GdkRegion in terms of cairo_region_t
Only changes in headers: GdkRegion is typedeffed to cairo_region_t. The
type was opaque so it doesn't matter.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-05-23 23:16:06 +02:00
Matthias Clasen
a184432baf Make the !xkb build survive a little longer
This fixes bug 619114.
(cherry picked from commit eff1fe2500)
2010-05-21 12:15:52 -04:00
Paul Davis
7d61c9fff5 Remove arbitrary limit on number of redraw rectangles
The aim of this limit was to not degrade performance too much, however,
it actually did degrade performance to a large extent.
2010-05-12 12:20:16 +02:00
Florian Scandella
53fae3247c Add heuristic for primary monitor
Use the first monitor returned by RANDR as primary, if primary
is not set and no LVDS is found.

https://bugzilla.gnome.org/show_bug.cgi?id=615128
2010-04-23 23:42:02 +02:00
Matthias Clasen
78e68d4548 Update the gdk_event_free docs
Bug 616118
2010-04-22 14:13:35 -04:00
Claudio Saavedra
51a1af7aa4 Use the proper screen in _gdk_windowing_get_shape_for_mask()
Bug 615853 - BadMatch when pressing keyboard volume keys while pointer in
             secondary X screen

_gdk_windowing_get_shape_for_mask() is using the default screen, not taking
into account that its GdkBitmap could have been created for a different one,
causing BadMatch errors.
2010-04-19 18:51:27 +03:00
Javier Jardón
791962e06d Include <X11/Xutil.h> in gdkdnd-x11.c
Otherwise, inclusion of shape.h triggers an unknown type error
for Region, and compile fails, at least in Solaris.

Reported by Philip Brown here:
https://bugzilla.gnome.org/show_bug.cgi?id=615028
2010-04-18 19:54:22 +02:00
Michael Natterer
9cac8f23d5 gdk: remove convert_coords_to_child()
and use the new public gdk_window_coords_from_parent().
2010-04-15 13:16:17 +02:00
Michael Natterer
878cde53d0 gdk: use gdk_window_is_offscreen() instead of checking manually 2010-04-15 13:08:47 +02:00
Michael Natterer
5a52d2a2f0 gdk: add API to convert coords between parent and child windows
which also works for offscreen windows and their embedder.
Also add gdk_window_get_effective_parent() and
gdk_window_get_effective_toplevel() which are offscreen aware.
2010-04-15 12:59:44 +02:00
Tor Lillqvist
e544602065 Add Visual Studio 2008 project files
Similar setup as in GLib and Pango. Also here we use a build/win32/vs9
subfolder, even if there is nothing else in build or build/win32.
2010-04-12 12:45:40 +03:00
Johan Bilien
d36b281a58 Fixed annotation of gdk_screen_get_rgb_colormap and similar
These return an object with no extra references, need to be transfer
none.
2010-04-09 13:53:19 -04:00
Javier Jardón
eb7121c4e6 [directfb] Fix compile error on DirectFB backend.
Add a stub for gdk_keymap_add_virtual_modifiers()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=613988
2010-04-09 18:15:55 +02:00
Matthias Clasen
b4adea7477 Fix a silly mistake in primary_monitor handling
It doesn't make sense to determine an index into an array, if
you are going to sort the array afterwards...pointed out in
bug 615128 by Florian Scandella.
2010-04-09 09:05:38 -04:00
Matthias Clasen
0efb24f589 Yet another fix for shape handling
This should fix problems with awn and notify-osd.
2010-04-06 20:33:19 -04:00
Adel Gadllah
20dacce4d8 [GdkScreenX11] Fix check in gdk_screen_get_primary_monitor
Fix bug in last commit.
2010-04-06 02:41:55 +02:00
Adel Gadllah
5651cbc4b4 [GdkScreenX11] Add heuristic for pre XRandR 1.3 drivers
Currently gdk_screen_get_primary_monitor just returns the first monitor,
in this case but both the panel and now gnome-shell use an additional
heuristic to prefer LVDS as primary if present.

Move this heuristic to gdk_screen_get_primary_monitor to avoid duplicating
it all over the place.

The fallback heuristic is also used when no primary output is set.

https://bugzilla.gnome.org/show_bug.cgi?id=614894
2010-04-06 02:36:53 +02:00
Hiroyuki Ikezoe
ffbd007c50 [directfb] Fix compile error on DirectFB backend.
Add a stub for gdk_keymap_map_virtual_modifiers.
2010-03-25 16:39:41 +01:00
Matthias Clasen
3ed737e5fc Another small doc cleanup 2010-03-22 23:15:52 -04:00
Matthias Clasen
f5c6712002 Minor doc cleanup 2010-03-22 23:10:38 -04:00
Damien Lespiau
0a0e0a868a introspection: Fix parallel builds
One needs to add an explicit dependency between the gir files and the
.la libtool wrapper as this dependency is not added automatically by
Makefile.introspection. Not adding these breaks parallel builds as make
does not wait for the .la to be generated before launching g-ir-scanner.
2010-03-22 12:53:18 -04:00
Matthias Clasen
996541d096 Don't crash in DND when the X server doesn't support SHAPE
Reported in bug 612768
2010-03-16 12:35:13 -04:00
Colin Walters
55feb804f0 [startup notification] Set APPLICATION_ID
http://lists.freedesktop.org/archives/xdg/2010-February/011321.html

In addition to ICON, BINARY_NAME etc., it's very helpful if launcher
programs include the name of the .desktop file they're launching.
This is APPLICATION_ID.

https://bugzilla.gnome.org/show_bug.cgi?id=611118
2010-03-14 15:13:26 -04:00
Matthias Clasen
f73f9d802c Fix gdk_window_set_icon_name
A typo kept this from working on toplevel windows.
Reported in bug 612346.
2010-03-12 15:59:59 -05:00
Matthias Clasen
9c8dbc292f Minor doc clarification for gdk_drag_begin
Mention that targets is a list of atoms. Bug 611317.
2010-03-08 21:01:30 -05:00
Matthias Clasen
28760d992b Init gdk in the same order as other backends
Patch by Andre Draszik, bug 609172
2010-02-23 13:07:23 -05:00
Matthias Clasen
7f483dbd7b Fix a memory leak in gdk_display_open in the directfb backend
Patch by Andre Draszik, bug 609172
2010-02-23 13:06:44 -05:00
Matthias Clasen
2dc9298b41 Simplify the DirectFBInit call
Patch by Andre Draszik, bug 609172
2010-02-23 13:06:03 -05:00
Matthias Clasen
3d66034d7d Catch directfb errors in gdk_colormap_new
Patch by Andre Draszik, bug 609172.
2010-02-23 13:05:24 -05:00
Matthias Clasen
e06edf375a Fix a crash at startup in the directfb backend
Patch by André Draszik, bug 600789
2010-02-23 12:54:00 -05:00
Matthias Clasen
cb184bed8c Fix gdk_windowing_window_at_pointer in the directfb backend
Patch by Hiroyuki Ikezoe, see bug 604799.
2010-02-23 12:51:45 -05:00
Matthias Clasen
325cbef27e Protect against X errors when clearing the DND cache
This was reported as a problem in bug 609952.
2010-02-23 12:51:44 -05:00
Matthias Clasen
42e90521a9 Only look at x11 backend for gtk-doc comments for now
See followup discussion in bug 610701
2010-02-23 10:24:55 -05:00
Matthias Clasen
bcee7bda64 Add some missing introspection annotations 2010-02-22 23:47:24 -05:00
Johan Dahlin
f0ce4dcaa5 [build] Include all target source files
Include all target source files when buildin the gir

https://bugzilla.gnome.org/show_bug.cgi?id=610701
2010-02-22 17:26:24 -03:00
Matthias Clasen
c85e7ec6d8 Add a missing introspection annotation for gdk_screen_get_default_colormap 2010-02-22 14:15:45 -05:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02: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
13d69e552d Fix a compatibility problem
It turns out that my attempt at handling Super, Hyper and Meta better
is causing problems, mostly because Alt and Meta are commonly colocated
in the modmap, and apps do a check for the Alt modifier regularly.

See e.g bug 607697.
2010-02-12 18:55:42 -05:00
Alejandro Piñeiro
bc39d88b44 Solve a wrong reference on gdk_keymap_translate_keyboard_state
Solves https://bugzilla.gnome.org/show_bug.cgi?id=608345
2010-02-09 11:52:49 +01:00
André Draszik
12edc32d95 gdk/directfb: cursor size is artificially limited
Cursor sizes in DirectFB can be large (4095x4095), limit to 128x128
though, because the x11 backend has this limit, too - for max.
compatibility.

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

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-02-07 20:12:43 +01:00
André Draszik
7f8b96d9bc gdk/directfb: convert gdkgc-directfb to using G_DEFINE_TYPE
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=609199

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-02-07 20:10:53 +01:00
André Draszik
e1a83243e4 gdk/directfb: gdkdnd-directfb's private data is used uninitialized
Use G_TYPE_INSTANCE_GET_PRIVATE() instead

In the process, convert to using G_DEFINE_TYPE, too.

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

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-02-07 20:08:52 +01:00
André Draszik
bc36a15446 gdk/directfb: convert gdkcolor-directfb to using G_DEFINE_TYPE
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=609191

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-02-07 20:06:52 +01:00
André Draszik
e71d3c459a gdk/directfb: fix _gdk_windowing_pointer_grab()
Fix for bgo #609188

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-02-07 20:01:05 +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
Kristian Rietveld
66207cf13e Improve enter/motion notify semantics
On X11 we receive enter notify and motion notify events for a window
regardless of its focus state.  On Mac OS X this is not the case.  This
commit improves the semantics to overcome this difference.  It improves
on my earlier patch that sent a motion notify event when a window became
main.

Instead of sending a motion notify when a window becomes main, we now
send one when a window becomes key, which comes closest to a window
getting focus in X11.  This motion notify is needed because Mac OS X does
not send motion events when an application is inactive (none of its
windows have focus), these events are sent in X11.  This dummy motion
notify event (with current coordinates of the mouse cursor) allows an
application to get its prelight and other state right when it gets focus
and thus user attention.

Another change is to send an enter notify event when updating the
tracking rectangle of a GdkQuartView and the mouse cursor is currently in
this rectangle.  This rectangle is at least updated on window creation.
This enter notify event is important for the case where a new window
appears right below the mouse cursor.  The window has to receive an enter
notify event for the subsequent events to be processed correctly.  Mac
OS X does not send one in this case, so we generate it ourselves.

Both of these synthesized events have to go through
_gdk_windowing_got_event() for updating statekeeping, etc.
append_event() has a boolean flag now to make this convenient.
2010-01-30 20:36:28 +01:00
Matthias Clasen
f286c6281a Minor doc fix 2010-01-25 22:32:00 -05:00
Alexander Larsson
3c618f2f1f Avoid integer overflow in gdk_rectangle_intersect
If e.g. the right edge of the leftmost rectangle is near MIN_INT, and
the left edge of the rightmost rectangle is large then subtracting these
can lead to an integer overflow, making the resultant "width" falsely
positive, thus returning a very wide result instead of the expected
no-intersection result.

We avoid the overflow by not doing the subtraction unless we know the
result will be positive. There are still risks for overflow if x + width
or y + width is larger than MAXINT, but we won't ever overflow for valid
rects now.

This may fix #607687
2010-01-22 09:41:17 +01:00
Alexander Larsson
3d9d002bed When native window requests button presses request other button related events
We need to do this because otherwise the implicit button grab for this
(native) window will not deliver the button events not selected for
by this window. This is a problem because non-native child windows may
select using a wider event mask, and we can't emulate these events if we
don't get the native events.

Fixes bug #607508
2010-01-20 15:37:16 +01:00
Alexander Larsson
e31a6d1fea Drop outstanding cairo surfaces when window is made native
Any old cairo_surface referencing the old impl window will be wrong
when we make a window native, so drop it.

This fixes bug #599511
2010-01-19 16:40:59 +01:00
Alexander Larsson
46d25437a1 Move common gdkwindow.c code into function gdk_window_drop_cairo_surface
This code is duplicated in several places, and more to come, so put
it all in one place.
2010-01-19 16:40:55 +01:00
Alexander Larsson
841fa47715 Track direct window cairo access and avoid tricks when used
When a cairo surface is requested for direct window access (i.e. not
when double-buffering) we can't really track when the actual drawing happens
as cairo drawing is not virtualized. This means we can't properly flush
any outstanding window moves or implicit paints.

This actually causes problems with e.g. abiword (bug #606009) where they
draw without double-buffering. If you press down it scrolls the window
and then draws the caret, but the caret drawing does not flush the
outstanding move from the scroll, so the caret gets drawn on the wrong
screen.

We fix this by never allowing either implicit paints or outstanding window
moves on impl-windows where any windows related to it has an outstanding
direct cairo surface. Luckily this is not very common so in practice this
doesn't matter much.
2010-01-19 15:01:03 +01:00
Alexander Larsson
f96e51db46 Avoid drawing implicit paints to destroyed windows
It may happen that a window gets destroyed during painting, if so
we should not draw the implicit paint double-buffered pixmap to it
as that will cause a BadDrawable X error.

This fixes bug 600865
2010-01-15 16:08:18 +01:00