Commit Graph

1288 Commits

Author SHA1 Message Date
Javier Jardón
71c501d895 Use a GPid on gdk_spawn_on_screen[_with_pipes] instead a gint
Reported by Nick Schermer in bug
https://bugzilla.gnome.org/show_bug.cgi?id=602289
2010-06-10 03:52:35 +02:00
Matthias Clasen
7644ac519a Fix up abi checking
The abicheck script was hardcoding assumptions about XI2 being used,
making it fail on e.g. RHEL5.
2010-06-07 06:16:21 -04:00
Javier Jardón
47f8beb0a6 Remove gdkx_colormap_get() deprecated function 2010-06-07 04:37:06 +02:00
Matthias Clasen
25864cf0ce Make gdk build against old X headers
The XI.h in RHEL5 is missing some defines that are used
in the new device code.
2010-06-06 19:40:20 -04:00
Javier Jardón
2ace397eb5 Remove deprecatedd code from GdkColor
https://bugzilla.gnome.org/show_bug.cgi?id=619649
2010-06-07 00:35:40 +02:00
Colin Walters
95bc0f5405 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:49:22 -04:00
Matthias Clasen
b96a05b81f Silence a few warnings in !HAVE_RANDR builds 2010-06-03 20:24:54 -04:00
Cody Russell
8e142788a5 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 10:32:18 -05:00
Javier Jardón
d6bacafc52 [docs] Use the correct gtk-doc notation
Use 'Deprecated: 3.0:' intead 'Deprecated: 3.0.'
2010-05-27 15:37:19 +02:00
Javier Jardón
019563c322 Remove gdk_*et_use_xshm() deprecated functions 2010-05-26 05:18:05 +02:00
Matthias Clasen
473b7aa6a2 2.90.1 2010-05-25 22:57:46 -04:00
Matthias Clasen
cbab03df69 Fix up distcheck 2010-05-25 20:26:07 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Matthias Clasen
50a72eda2d 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-25 12:01:04 -04:00
Javier Jardón
5917eba911 gdkevents-x11: Do not break strict-aliasing rules
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619385
2010-05-22 23:17:58 +02:00
Javier Jardón
7f89bf262b gdkevents-x11.c: Remove unused function: graphics_expose_predicate() 2010-05-22 22:49:58 +02:00
Matthias Clasen
eff1fe2500 Make the !xkb build survive a little longer
This fixes bug 619114.
2010-05-21 12:13:05 -04:00
Tadej Borovšak
ff61948d13 Move documentation to inline comments: GdkWindow
Use examples/gdk to store documentation code examples.

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

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-05-14 17:11:51 +02:00
Javier Jardón
2b64a7fd54 Remove some deprecated stuff from GdkWindow
Also, substitute the deprecated functions with the correct ones
2010-05-12 04:29:55 +02:00
Matthias Clasen
7447ef0fc2 Make 3.0 parallel-installable to 2.x
In particular, rename

  - libraries to lib*-3.0.so
  - pc files to *-3.0.pc
  - include paths to /usr/include/gtk-3.0/*
  - module paths to /usr/lib/gtk-3.0/*
  - rc files names to gtk-3.0/gtkrc
  - commandline utilities to *-3.0
  - adjust documentation

Also change the install location for unix-print headers to
/usr/include/gtk-3.0/unix-print/gtk.
2010-05-08 01:18:53 -04:00
Javier Jardón
906a510007 Remove deprecated code from GdkImage 2010-05-03 01:48:45 +02:00
Javier Jardón
7894951cee Remove deprecated code from GdkEvent 2010-05-03 01:48:45 +02:00
Javier Jardón
8c46ef830b Remove deprecated code from GdkDnd 2010-05-03 01:45:00 +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
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
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
Matthias Clasen
f5c6712002 Minor doc cleanup 2010-03-22 23:10:38 -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
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
bcee7bda64 Add some missing introspection annotations 2010-02-22 23:47:24 -05:00
Matthias Clasen
c85e7ec6d8 Add a missing introspection annotation for gdk_screen_get_default_colormap 2010-02-22 14:15:45 -05: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
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
Matthias Clasen
f286c6281a Minor doc fix 2010-01-25 22:32:00 -05:00
Matthias Clasen
03b179c5e8 Try harder to handle accelerators involving virtual modifiers
This patch changes GDK to add all matching virtual modifiers in
the state field of the key event. The corresponding GTK+ change makes
use of a new GdkKeymap function to map virtual modifiers back to
real modifiers and detect conflicts while doing so.

This should fix bug 603190 and bug 427409.
2009-12-21 11:15:28 -05:00
Matthias Clasen
7a9a3077e4 Ensure native windows in gdk_property_change
Using X properties on non-toplevel windows is somewhat exotic,
but some people seem to do it, so better to keep it working.
See bug 604787.
2009-12-18 18:43:32 -05:00
Colin Walters
18dc96caf8 Merge in Gdk-custom.c introspection annotations
The Gdk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GDK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.

https://bugzilla.gnome.org/show_bug.cgi?id=592279
2009-12-16 17:22:01 -02:00
Cody Russell
662e69ad3e Add gdk_screen_get_primary_monitor(). This fixes bug #601712 2009-12-08 11:27:02 -06:00
Alexander Larsson
48fc0f36c2 Fix mouse pointer handling on multiple screens
The fix in 786b589d95 for the
"Cannot click buttons more than once without moving the mouse cursor"
did not correctly handle setups with multiple screens in one display.

We need to handle the case where the first XQueryPointer returns
a different root window than the default one.

This fixes bug 597386 (agaion)
2009-12-07 10:49:57 +01:00
Matthias Clasen
36ca3fd5e9 Add a missing include
memset() is used in gdk/x11/gdkinput-xfree.c but string.h is not included.
Patch by Vincent Untz, bug 597026.
2009-11-27 20:59:42 -05:00
Matthias Clasen
43a07af9b1 Be a bit more forgiving about invalid monitor number
By moving the g_return_if_fail() checks into individual monitor functions.
See bug 561130.
2009-11-27 18:39:15 -05:00
Matthias Clasen
5bfab2b9d4 Short-circuit get_frame_extents for override-redirect windows
There's no reason to do our expensive round-trips for an override-redirect
window; just use local information. See bug 581145. Patch by Owen Taylor.
2009-11-27 18:19:20 -05:00
Matthias Clasen
d4b92737ab Make level3 keys work again
We were not paying attention to consumed modifiers when adding
virtual modifiers. This fixes RH bug 537567.
2009-11-25 01:02:40 -05:00
Javier Jardón
ecc3065f76 Only use gdk_input_select_events() if XINPUT_NONE is defined
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=601337
2009-11-11 17:42:20 +01:00
Javier Jardón
7d1c8fa644 [gdk/x11/gdkdnd-x11] Add missing "Deprecated: 2.x" to the api doc comments. 2009-11-06 03:41:02 +01:00
Javier Jardón
8082aad271 Use "Deprecated:" gtk-doc symbol corrently
Also, added some suggestion about replacements for deprecated functions
2009-11-06 03:03:40 +01:00
Nicola Fontana
1e1131c959 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600158
2009-11-06 01:21:09 +01:00
Alexander Larsson
39993f147f Add supports_native_bg to GdkWindowImpl
Backends that support native window background setting (and that clears
new window areas to this color/pixmap) should set this to true.

Currently only X11 supports this.
2009-11-05 12:52:12 +01:00
Javier Jardón
3dbfc08a7a Fix some compilation warnings
Fixed the prototypes of MyEnhancedXkbTranslateKeyCode() and
translate_keysym() to take a gint* because those functions treat
these arguments as an int, so we get around the need to cast.
2009-10-30 18:33:16 +01:00
Javier Jardón
d76287c94b Fix warning: cast to gchar* 2009-10-30 04:04:28 +01:00
Javier Jardón
d3155bb1ea Remove some unnused variables 2009-10-20 20:37:46 +02:00
Javier Jardón
57bc513713 Use g_object_ref/unref instead deprecated gdk_*_ref/unref functions
Substitute deprecated reference counting functions for
g_object_ref/unref in documentation and in internal code

https://bugzilla.gnome.org/show_bug.cgi?id=598217
2009-10-14 03:13:52 +02:00
Alexander Larsson
786b589d95 Fix up _gdk_windowing_window_at_pointer coordinate reporting
We need to do a final XQueryWindow to get the coordinates inside the
windows rather than in the parent window.

This fixes bug #597386, "Cannot click buttons more than once...", which
failed due to the grab tracking stuff getting the wrong coordinates as
per the above.
2009-10-05 11:41:50 +02:00
Pascal Terjan
f3013bf6ed Call XReconfigureWMWindow with proper screen
Thanks gcc :

gdkwindow-x11.c:1731: warning: passing argument 3 of
'XReconfigureWMWindow' makes integer from pointer without a cast
/usr/include/X11/Xlib.h:1871: note: expected 'int' but argument is of
type 'struct GdkScreen *'

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
2009-10-01 18:36:43 +02:00
Thomas Jaeger
35845f1efe Interpret min_value == max_value correctly
https://bugzilla.gnome.org/show_bug.cgi?id=588649

Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
2009-09-30 09:21:12 +02:00
Thomas Jaeger
70bd23537f Select for DeviceStateNotify
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-30 09:21:11 +02:00
Thomas Jaeger
0178ebf739 Keep track of axis values
https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-30 09:21:10 +02:00
Thomas Jaeger
67728ac004 Filter out events that the current window didn't select for
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:25 +02:00
Thomas Jaeger
51f2a99096 Always select all XInput motion events
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:23 +02:00
Thomas Jaeger
acdecb6aa4 Report XInput button motion events until all buttons are released.
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:21 +02:00
Thomas Jaeger
2635fb75c6 XInput allows up to 255 buttons
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:18 +02:00
Thomas Jaeger
abf7742beb Refactor _gdk_input_other_event
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:17 +02:00
Thomas Jaeger
bd51d930e8 Use strstr instead of g_strrstr.
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
2009-09-29 12:58:52 +02:00
Thomas Jaeger
7d196b3939 Improve detection of input device source type
This detection code is not 100% reliable, but it should fare much better
than the current code, which just compares the device name to a fixed
set of strings.  Many applications depend on erasers being recognized
reliably, so we start by checking for a device name containing the
substring 'eraser'.

Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
2009-09-28 16:08:42 +02:00
Alexander Larsson
5ebb32d1ff Extend _gdk_windowing_window_at_pointer to be able to get toplevels only
This has two advantages:
1) In many backends, this is faster as we can terminate the window
hierarchy traversal earlier
2) When used in gdkdisplay.c::get_current_toplevel() to get the
current toplevel that has the pointer we now correctly return
a toplevel with the pointer in it where the pointer is inside
some foreign subwindow of a toplevel window.

The second advantage fixes some bugs in client side event generation
when the pointer is inside such a foreign child window.
2009-09-28 15:21:54 +02:00
Carlos Garnacho
bfc88240b4 Always report XInput events to the grab window if any.
The grab window should be the first option to send events to, else we may
get unpaired events, making display->ignore_core_events go crazy.

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-21 20:04:22 +02:00
Carlos Garnacho
d37268c60f Block extended events to windows that didn't select them.
Now XSelectExtensionEvent() is called on the native window, so there
may be virtual windows inside that shouldn't receive extended events.

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-21 20:04:22 +02:00
Carlos Garnacho
13c258f891 Fix x/y coordinates for extended events.
Extended events were being reported to virtual windows without taking into
account the position of the virtual window inside the native one.

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-21 20:04:21 +02:00
Michael Natterer
659776ce35 Fix gdk_device_get_history() for the core pointer
When filtering out the events for "window" from the events we got for
our "impl_window", don't forget to adjust the returned number of
events because it might be smaller than what XGetMotionEvents has
returned, and free coords we allocated too much. Also if we filtered
away *all* events, return FALSE and get rid of the allocated history
entirely. Together fixes all sorts of mishehavior when painting in
GIMP, from coords going wild to plain crashes and infinite loops.
2009-09-17 11:38:14 +02:00
Michael Meeks
02b102cbbc fix whitespace error 2009-09-14 15:34:43 +01:00
Michael Meeks
db88f084bc fix race between fetching owner of composit selection, and
registering as a listener for changes; bug#594913
2009-09-14 15:33:59 +01:00
Matthias Clasen
8f16541d93 Fix gdk_display_beep
Since XBell() seems broken, just call XkbBell().
2009-09-13 23:16:44 -04:00
Matthias Clasen
be22a62160 Cleanups
This commit removes dead code, mostly pointed out by clang.
2009-09-10 13:53:28 -04:00
Matthias Clasen
aa9bb7d8e4 Deprecate gdk_event_get_graphics exposes
This function is only used in deprecated, broken widgets. Also,
fix up some of its implmentation that clang was complaining about.
2009-09-09 09:00:15 -04:00
Matthias Clasen
da00e171e7 Correct the initial event mask of the root window
This fixes bug 588455 where the panel stopped responding to Alt-F2 when
setting a transparent background.
2009-09-06 02:44:24 -04:00
Matthias Clasen
bec0d570b0 Fix the build 2009-09-04 23:00:27 -04:00
Matthias Clasen
5c14089225 Make window manager tracking work better
We were getting the new wm name with a 15 second delay, due to
some race. Reported in bug 593644.
2009-09-04 20:22:43 -04:00
Alexander Larsson
d0ac27fe5f Add function accessors for x11 window/pixmap impl 2009-09-04 17:59:17 +02:00
Alexander Larsson
d67a7eda16 Add gdk_window_restack
This lets you restack a window above or below a specified sibling.
At least eclipse wants this functionallity.
2009-09-02 23:38:55 +02:00
Alexander Larsson
cc5b22cc81 Don't update window->shaped from backends
This is properly updated from the main code these days and
should not be touched by the backend code.
2009-08-31 15:06:01 +02:00
Matthias Clasen
f649237bf2 Minor doc fix 2009-08-31 00:55:57 -04:00
Matthias Clasen
7e4e2c636e Fix a documentation error
Reported by Eduard Bagrov in bug 592862.
2009-08-29 20:23:07 -04:00
Matthias Clasen
e0a1e78a5a Silence the conversion from xatom to atom too 2009-08-20 18:06:35 -04:00
Matthias Clasen
be83e8789c Tiny docs improvement
Mention that gdk_xid_table_lookup may return  NULL. Bug 591432.
2009-08-17 13:46:30 -04: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
a3ee8271a9 Check for GraphicsExpose too in expose_serial_predicate
GraphicsExpose cause invalidation too, so we need to look for such
events in addition to normal Expose events.
2009-08-13 14:46:01 +02:00
Alexander Larsson
0fc8c475a8 Remove old comment about guffaw scrolling
We no longer use guffaw scrolling since the client side windows
branch was merged.
2009-08-10 14:27:53 +02:00
Javier Jardón
ec7c24d227 Remove some unused variables (GnomeBug:591218) 2009-08-10 11:06:54 +02:00
Matthias Clasen
69fc109c22 Avoid some gratitious behaviour changes
Go back to allowing a lot of the WM-level functions on foreign windows,
since we used to allow that before csw. Fixes bug 589732.
2009-08-08 22:00:07 -04:00
Alexander Larsson
aa8693f2cb Track viewable for GdkWindow 2009-07-18 23:11:54 +02:00
Alexander Larsson
9063e5b3bf Ensure that windows used for selections are native
This fixes cut and paste in gvim (#588115)
2009-07-10 19:36:38 +02:00