Commit Graph

4796 Commits

Author SHA1 Message Date
Matthias Clasen
c3d2df4eab GDK: Adapt to GLib thread api changes 2011-11-01 21:11:04 -04:00
Bastien Nocera
1cffe6c2e4 gdk: Translate keyboard brightness keys
https://bugzilla.gnome.org/show_bug.cgi?id=662628
2011-10-26 10:36:43 +01:00
Bastien Nocera
aceccd5819 gdk: Make gen-keyname-table.pl work again
keyname-table.h was modified by hand, and gen-keyname-table.pl
couldn't be used to generate that file again.

https://bugzilla.gnome.org/show_bug.cgi?id=662628
2011-10-26 10:36:43 +01:00
Michael Natterer
077b366879 quartz: don't return FALSE from GdkDevice::query_state()
Not finding a child window to return is not a failure.
2011-10-22 23:21:02 +02:00
Matthias Clasen
34d6caab5e Don't refer to --sync anymore
That commandline option got replaced with an environment variable,
so mention that in the warning text.

https://bugzilla.gnome.org/show_bug.cgi?id=662132
2011-10-20 21:50:01 -04:00
Javier Jardón
0853ce3077 Use G_VALUE_INIT
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Michael Natterer
616afadd78 gdk: s/gdk_cursor_unref/g_object_unref/ 2011-10-15 14:35:28 +02:00
Matthias Clasen
9e0efc5022 Add deprecation annotations for deprecated functions
We define our own GDK_DEPRECATED[_FOR] macros for this
and allow it to be turned off by defining the
GDK_DISABLE_DEPRECATION_WARNINGS macro.
2011-10-11 15:03:46 -04:00
Alex Corrado
defdfde999 Quartz, Bug 655057: Eliminate Compiler Warning
When compiled with older SDKs, the original change for this bug caused a
compiler warning about NSWindow not being able to handle a setStyleMask
message. This tricks the compiler into thinking that it can.
2011-10-09 10:18:40 -07:00
Matthias Clasen
a35d8764da Add G_GNUC_DEPRECATED annotations in GDK 2011-10-09 09:55:08 -04:00
Kristian Rietveld
d172f1ce22 quartz: also update window position on windowDidResize
When a window goes fullscreen, the resize also changes its size.
2011-10-08 11:47:11 +02:00
Michael Natterer
5b74ee38e8 gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway
In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was
implicitly used as implementation for all !X11 backends.

In 3.x, when this function was virtualized in GdkDisplayManager,
this fallback was moved to the X11 backend and the other backends
"equipped" with /* FIXME implement */ implementations of
keyval_convert_case() which don't convert anything.

Move the fallback code back to gdk/ as default implementation
of GdkDisplayManager::keyval_convert_case() and remove its
implementations is all backends but X11. Also remove the
implementation in Wayland which was a plain copy of what
is now the default implementation.
(cherry picked from commit f46c1b76d8)
2011-10-07 16:19:41 +02:00
Adel Gadllah
25e65dc1b5 gdk: Plug leak in gdk_display_pointer_is_grabbed
gdk_x11_device_manager_core_list_devices returns a new allocated
list, which has to be freed.

valgrind output:

==18686== 160,176 (80,088 direct, 80,088 indirect) bytes in 3,337 blocks are definitely lost in loss record 25,347 of 25,378
==18686==    at 0x4C256DD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18686==    by 0x6CD7752: g_malloc (in /lib64/libglib-2.0.so.0.3000.0)
==18686==    by 0x6CEE2B6: g_slice_alloc (in /lib64/libglib-2.0.so.0.3000.0)
==18686==    by 0x6CCB37D: g_list_prepend (in /lib64/libglib-2.0.so.0.3000.0)
==18686==    by 0x654CADA: gdk_x11_device_manager_core_list_devices (gdkdevicemanager-core-x11.c:836)
==18686==    by 0x6531489: gdk_display_pointer_is_grabbed (gdkdisplay.c:1270)
==18686==    by 0x5162E1E: filter_func (ui.c:140)
==18686==    by 0x6558B50: gdk_event_apply_filters (gdkeventsource.c:83)
==18686==    by 0x6558CB3: _gdk_x11_display_queue_events (gdkeventsource.c:197)
==18686==    by 0x6530680: gdk_display_get_event (gdkdisplay.c:311)
==18686==    by 0x65589F1: gdk_event_source_dispatch (gdkeventsource.c:356)
==18686==    by 0x6CD0A0E: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)

https://bugzilla.gnome.org/show_bug.cgi?id=660676
2011-10-03 14:11:43 +02:00
Matthias Clasen
c8eb4e5abe Add new api to gdk.symbols
This keeps 'make check' happy.
And if 'make check' is happy, so am I.
2011-10-02 10:22:13 -04:00
Javier Jardón
522c305c12 gdkcreen-x11: Use GdkRGBA instead GdkColor 2011-10-01 20:45:27 +01:00
Rui Matos
34357481b3 docs: Delete duplicate line in gdkwindow.c 2011-10-01 01:24:36 +01:00
Cosimo Cecchi
036c193fb2 GdkWindow: fix conditional jump depends on uninitialized value error
Those if() blocks don't have any reason being there, as x and y are not
pointers. If the window is destroyed, just set the out values to zero
and return.

As seen in valgrind:

==3306== Conditional jump or move depends on uninitialised value(s)
==3306==    at 0x624C74F: gdk_window_get_root_coords (gdkwindow.c:6933)
==3306==    by 0x5E193C3: gtk_tooltip_show_tooltip (gtktooltip.c:1160)
==3306==    by 0x5E19C05: tooltip_popup_timeout (gtktooltip.c:1282)
==3306==    by 0x623B102: gdk_threads_dispatch (gdk.c:754)
==3306==    by 0x8592F3A: g_timeout_dispatch (gmain.c:3907)
==3306==    by 0x859174C: g_main_context_dispatch (gmain.c:2441)
==3306==    by 0x8591F47: g_main_context_iterate (gmain.c:3089)
==3306==    by 0x8592494: g_main_loop_run (gmain.c:3297)
==3306==    by 0x5D2E501: gtk_main (gtkmain.c:1362)
==3306==    by 0x5C5652F: gtk_application_run_mainloop
(gtkapplication.c:115)
==3306==    by 0x7C47C9D: g_application_run (gapplication.c:1323)
==3306==    by 0x447B5F: main (nautilus-main.c:102)
==3306==  Uninitialised value was created by a stack allocation
==3306==    at 0x624D48A: gdk_window_get_device_position
(gdkwindow.c:4952)
2011-09-28 20:20:19 -04:00
Michael Natterer
0a13deae88 quartz: don't filter away directly encoded 24-bit UCS characters
gdk_unicode_to_keyval(uc) returning (uc | 0x01000000) is not an
error return value but simply the way to encode 24-bit unicode
characters directly as keyvals.
2011-09-28 13:48:52 +02:00
Michael Natterer
2d3db3421f Bug 659406 - Abstract what triggers a context menu
Add gdk_event_triggers_context_menu(), using the new modifier
abstraction API. Remove _gtk_button_event_triggers_context_menu()
and port all callers.
2011-09-27 15:45:18 +02:00
Michael Natterer
4a7a67339a Bug 659602 - Provide an abstraction for the platform's use of modifier keys
Add enum GdkModifierIntent which identifies use cases for modifier masks
and GdkKeyMap::get_modifier_mask(). Add a default implementation which returns
what is currently hardcoded all over GTK+, and an implementation in the
quartz backend. Also add gtk_widget_get_modifier_mask() which simplifies
things by doing widget->display->keymap->get_modifier_mask().
2011-09-27 09:56:25 +02:00
Michael Natterer
a99d14f61c quartz: resolve the modifier confusion on the Mac
- map Alt/Option to MOD1
- map Command to MOD2
- map MOD2 to the virtual Meta
- improve/fix (?) group handling in gdkkeys-quartz.c
2011-09-26 16:01:50 +02:00
Matthias Clasen
5ff8fe6971 Documentation fixes
Mostly making sure that return values and varargs don't loose
their docs.
2011-09-25 21:04:49 -04:00
Javier Jardón
493d79886e gdk/gdkkeys.h: Remove api documentation as Its already in the .c file 2011-09-16 13:12:02 +02:00
Richard Hughes
14df59d47c Fix a segfault if the GAppInfo does not have an icon
This fixes the following backtrace:

 0  g_logv (log_domain=0x7ffff60461a4 "GLib-GObject", log_level=<optimized out>,
    format=0x7ffff599c322 "%s: assertion `%s' failed", args1=0x7fffffffc418) at gmessages.c:577
 1  0x00007ffff59312d2 in g_log (log_domain=<optimized out>, log_level=<optimized out>,
    format=<optimized out>) at gmessages.c:591
 2  0x00007ffff601c3c7 in g_object_ref (_object=0x0) at gobject.c:2648
 3  0x00007ffff7721e22 in gdk_x11_app_launch_context_get_startup_notify_id (context=<optimized out>,
    info=0x7fffe8004b40, files=<optimized out>) at gdkapplaunchcontext-x11.c:331
 4  0x00007ffff62e60d0 in _g_desktop_app_info_launch_uris_internal (appinfo=0x7fffe8004b40, uris=0x0,
    launch_context=0x7fffe401c800, spawn_flags=G_SPAWN_SEARCH_PATH, user_setup=0, user_setup_data=0x0,
    pid_callback=0, pid_callback_data=0x0, error=0x7fffffffc848) at gdesktopappinfo.c:1269
 5  0x00007ffff62e630a in g_desktop_app_info_launch_uris (appinfo=<optimized out>, uris=<optimized out>,
    launch_context=<optimized out>, error=<optimized out>) at gdesktopappinfo.c:1341
 6  0x00007ffff62e636b in g_desktop_app_info_launch (appinfo=0x7fffe8004b40, files=<optimized out>,
    launch_context=0x7fffe401c800, error=0x7fffffffc848) at gdesktopappinfo.c:1388
2011-09-13 16:41:38 +01:00
John Ralls
b71f28037f Bug 617583 - Dead accents keys don't work in GTK+ applications on OSX
Handle dead keys in special_ucs_table and have them converted by
UCKeyTranslate(), so all dead key combinations can be entered.
Later, this should be handled in the input method, just as it's
done for X11/Win32.
2011-09-09 10:56:49 +02:00
Carlos Garnacho
79ff1b669c x11: Don't create GdkDevices for disabled devices
Fixes bug #658379 - Disabled devices still added to list on startup,
spotted by Bastien Nocera. Do not create GdkDevices for disabled
devices on device manager construction, leading to a confusing initial
state.
2011-09-06 20:04:08 +02:00
Cosimo Cecchi
f7c188c019 API: add accessors for GdkEvent fields
Add accessors for the following fields: button, keyval, keycode, scroll
direction, click count.

https://bugzilla.gnome.org/show_bug.cgi?id=657384
2011-08-28 19:50:34 -04:00
Daniel Nicoara
99f489b5ef wayland: Acquire cairo device during operations that need the GL context 2011-08-22 16:32:06 -04:00
Greg Hellings
bd26ce1db6 Install gdk/win32 headers
Added install commands for the gdk/win32 headers as referenced from
gdkwin32.h.

https://bugzilla.gnome.org/show_bug.cgi?id=653964
2011-08-15 13:00:14 +03:00
John (J5) Palmieri
c3e0a0035e [gi] annotate gdk_container_set_user_data to take a GObject
* this allows bindings to correctly marshal the parameter
2011-08-14 08:07:10 -04:00
John Ralls
f84c787be4 Bug 655122: Lion Crashes during resize
Move resizing detection to a separate function and on 10.7 detect
resizes on all edges so that they don't result in grabs.
2011-08-13 15:30:59 -07:00
John Ralls
fc7dfd7246 Bug 655122: Detect OSX version for handling version-dependent special
cases (the one at hand is window resizing, which is handled differently
on OSX 10.7 from earlier versions).
2011-08-13 15:29:11 -07:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Pavel Holejsovsky
21a5b038a7 Add annotations so that methods are properly paired to objects.
Add type annotations to 1st argument of gdk_x11_* functions so that they are
properly recognized as methods of GdkX11 objects.

https://bugzilla.gnome.org/show_bug.cgi?id=655496
2011-08-01 11:09:49 +02:00
Pavel Holejsovsky
0893a3fd39 Enable introspection of X11-specific functions and methods
Functions dealing with native Xlib types were (skip)ed because
gobject-introspection did not have correct Xlib types declarations.
They are corrected now, so these GdkX11 functions can be enabled back
again.

https://bugzilla.gnome.org/show_bug.cgi?id=655495
2011-08-01 11:09:39 +02:00
Kristian Rietveld
58ba8a7c7f quartz: use already existing current_button_state variable 2011-07-30 23:01:38 +02:00
Kristian Rietveld
a979e414fb quartz: remove _gdk_quartz_events_get_current_event_mask 2011-07-30 23:01:38 +02:00
Kristian Rietveld
c9f6c7645c quartz: return modifiers instead of an event mask ... 2011-07-30 23:01:37 +02:00
Kristian Rietveld
ceca333309 quartz: Remove MAC_OS_X_VERSION_MIN_ALLOWED ifdef
I tried to suppress compiler warnings on pre-10.6 machines this way,
but it defeats its purpose when you compile for pre-10.6 machines on
a 10.6 machine.  For now, we have to live with the warnings when
compiling on/for pre-10.6 machines, there does not seem an easy and proper
way to suppress the warnings.
2011-07-28 17:44:02 +02:00
Michael Hutchinson
786521d5a8 Bug 655074 - Fix crash with undecorated windows on MacOS Lion 2011-07-25 12:33:26 +02:00
Matthias Clasen
2937a875a0 Ditch some long dead perl cruft 2011-07-23 13:44:45 -04:00
Patrick Welche
0388781e8f XK_Num_Lock is called GDK_KEY_Num_Lock in this source tree. 2011-07-22 19:19:33 +01:00
Matthias Clasen
25a4e8e7de Don't return a value from a void function
Reported in bug 654720, patch by Brian Cameron.
2011-07-17 18:05:17 -04:00
Carlos Garnacho
b5f30143ed x11: Skip GenericEvents with no cookie data in the xi2 device manager
https://bugzilla.gnome.org/show_bug.cgi?id=653947

It could happen that a cookie event has been already allocated/freed
in an event filter, as it can't be allocated a second time, all GDK
can do is skipping the event. Spotted by Guillaume Desmottes.
2011-07-15 18:33:44 +02:00
Carlos Garnacho
6aab48ead0 gdk/x11: Add gdk_x11_device_manager_lookup()
This function can be used to find the GdkDevice wrapping
an XInput2 device ID. For core devices, the Virtual Core
Pointer/Keyboard IDs (2/3) may be used.
2011-07-15 18:14:38 +02:00
Carlos Garnacho
f90c154472 gdk/x11: Add gdk_x11_device_get_id()
This function can be used to find out the XInput2 device ID
behind a GdkDevice, mostly useful when you need to interact
with say Clutter, or raw libXi calls.
2011-07-15 18:14:38 +02:00
John Ralls
86794ce008 Bug 653450 - gtkfilechooser crashes when added favorite
Ensure that display is set during drag-and-drop, and that string lists'
memory is zeroed after allocation to prevent g_strfreev() from
over-running.
2011-07-14 14:17:51 +02:00
Juan Pablo Ugarte
704dd8327f Fixed bug #654125 "gdkoffscreenwindow set any impl handlers to null but adhoc gdk_window_set_* do not cope" 2011-07-08 19:27:00 -03:00
Javier Jardón
32e00d1f43 Use AM_CPPFLAGS instead the obsolete INCLUDES 2011-07-06 15:58:32 +01:00
Joachim Breitner
317d7a1f54 docs: Remove mention of client messages 2011-07-05 16:08:04 -04:00
Matthias Clasen
c22fb1684c GdkKeymap: Prevent an infinite loop in the non-XKB case
Somehow the increment got lost, as comparison with the 2.x code
shows.
2011-06-30 14:45:16 -04:00
Scott Moreau
24f1132671 Track wayland protocol changes. 2011-06-23 07:06:35 -04:00
Matthias Clasen
0c162851ed Add a missing break statement 2011-06-14 21:59:55 -04:00
Matthias Clasen
5254fbacfb Avoid an oob read 2011-06-14 21:56:50 -04:00
Carlos Garnacho
d3274e8e06 xi2: Handle XIM modules that replace events
Fixes Bug 645993 - XIM has wierd behaviors. Some XIM modules
filter every key event, possibly replacing it with their own
one. These events usually have serial=0, so make
GdkDeviceManagerXI2 also listen on these.
2011-06-13 07:16:16 -04:00
Javier Jardón
7c688cb8a6 gdk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Benjamin Otte
e45230ad39 gdk: Make background changes queue a repaint
For client-side windows, we need to queue a repaint when the background
changes. For native windows, the windowing system does take care of it,
but client-side windows are our own, so we gotta do it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=652102
2011-06-09 05:51:53 +02:00
Benjamin Otte
2a4c361831 gdk: Don't set backgrounds on input-only windows
It doesn't make sense to allow a background on input-only windows, so
instead of setting it and then never using it, we just don't ever set
it.
2011-06-09 05:51:53 +02:00
Chun-wei Fan
d07907d2de Update Windows Resource template information 2011-06-07 11:16:57 +08:00
Bastien Nocera
7a0dc3c72d gdk: Update keysyms list from latest X.org headers
Fixed the touchpad on/off keybindings in gnome-settings-daemon.
https://bugzilla.gnome.org/show_bug.cgi?id=651706
2011-06-06 21:15:53 -04:00
Carlos Garnacho
e89d6b8741 configure: Check for XGetEventData()
This is a call only available in recent libX11, only the XI2 code
depends on this within GDK, but XI2 implies having GenericEvents
available too.
2011-05-27 11:53:26 +02:00
Carlos Garnacho
3285605c54 gdk: do not fallback to event->xany.window in GdkEventTranslator
This is already done in gdk_event_source_get_filter_window(), and
could lead to wrong event assignment if an event translator happens
to return a window for an event it doesn't handle.
2011-05-27 11:53:04 +02:00
Matthias Clasen
f30efa7759 Remove unused function attributes from symbol files 2011-05-22 23:39:48 -04:00
Kristian Rietveld
cd3896e10e quartz: actually register gdk_quartz_display_dispose 2011-05-22 12:29:37 +02:00
Kristian Rietveld
dfff35423f quartz: fix a typo 2011-05-22 12:27:38 +02:00
Carlos Garnacho
1b53741e4c gdk: Document gdk_window_add_filter()+XGenericEvents behavior 2011-05-18 22:34:33 +02:00
Carlos Garnacho
a529568f79 gdk: Get the right filter window for XI2 events
GdkDeviceManagerXI2 now implements GdkEventTranslator::get_window,
retrieving the right window from the contained XIEvent.
2011-05-18 22:34:33 +02:00
Carlos Garnacho
55cc9f3339 gdk: Add _gdk_x11_event_translator_get_window()
This method can be implemented by event translators so they
return the right window from XGenericEventCookie events, as
ev->xany.window isn't meaningful for these.

GdkEventSource now also uses this to find out the right window
filters to apply.
2011-05-18 22:34:33 +02:00
Carlos Garnacho
53d77a829a gdk: Move XGetEventData() call to GdkEventSource
This function should be called just once across every possible
event translator and GdkFilterFunc that wants to deal with
any cookie event.
2011-05-18 22:34:32 +02:00
Colin Walters
7bc2f539d0 Explicitly declare internal reserved bits in GdkModifierType
XKB and GDK both add "internal" bits to GdkModifierType.  In C,
this typically doesn't cause problems as bitfields are just integers,
and there's no validation.  However for bindings, it's normal to
convert enumerations to "native" enumeration types, which don't
support unknown bits.  See bug 597292.

https://bugzilla.gnome.org/show_bug.cgi?id=634994
2011-05-16 12:35:40 -04:00
Colin Walters
931e8e38ef gdk_display_get_pointer: Screen out parameter is (transfer none) 2011-05-16 12:35:40 -04:00
Kristian Høgsberg
2ebdcf5f37 wayland: Track wayland API changes 2011-05-08 13:20:11 -04:00
Matthias Clasen
5b9e402cf3 Fix a typo in !HAVE_XCURSOR code paths
Patch by Victor Oliveira,
http://bugzilla.gnome.org/show_bug.cgi?id=649665
2011-05-07 12:01:04 -04:00
Javier Jardón
1fcfa91ee3 gdk/x11/gdkcursor-x11.c: Use GdkRGBA instead GdkColor 2011-05-04 17:58:17 +01:00
Kristian Rietveld
8285c7f60f GdkWindow: remove unused variable 2011-05-04 07:31:39 +02:00
Carlos Garnacho
2a1a969d23 GdkWindow: Fix gdk_window_set_[device_]cursor() issues with root/foreign windows
It could be the case that gdk_window_set_cursor() is called on
pointers not yet known to the device tracking code in GdkDisplay,
so update the cursor on all master pointers.

The code actually updating the cursor for the given window has
been refactored out to gdk_window_set_cursor_internal(), used
in gdk_window_set_device_cursor() as well, which makes it handle
root/foreign windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=649313
2011-05-04 01:00:42 +02:00
Martin Pitt
1e1cca8912 GdkWindow: Add missing (allow-none) annotations 2011-05-03 09:30:49 +02:00
Chun-wei Fan
527a299fdd Bug 643270: VS2010 Project Files (autotools)
-Update to distribute the VS2010 files.
-Added rules in Makefile.am's of GDK and GTK to fill in the
 project/filter files templates with up-to-date source file
 listings to simplify maintenace.

Any comments on the usage of the VS2010 files are welcome!
2011-04-27 00:48:05 +08:00
Michael Natterer
6c24a25751 gdk: add precondition checks to all GdkKeymap functions
so it warns instead of simply crashing. Also fix some whitespace
stuff.
2011-04-21 23:54:52 +02:00
Lapo Calamandrei
ce80929b83 [broadway] New adwaita based css for "wm"
Created by Lapo Calamandrei.
2011-04-19 08:30:21 +02:00
Alexander Larsson
dc56a51cec [broadway] Remove debug spew 2011-04-18 20:51:53 +02:00
Alexander Larsson
cfd8150759 [broadway] Use cairo to generate png uris 2011-04-18 20:51:53 +02:00
Alexander Larsson
0abd5e2767 [broadway] Stream data over websocket
The zlib compressed xmlhttprequest thing was a nice hack, but it doesn't
really work in production. Its not portable, doesn't have enought API
(missing notification for closed sockets) and having to synchronize
between two different connections in a reliable way is a pain.

So, we're going everything over the websocket. This is a pure switch,
but after this we want to modify the protocol to work better over
the uncompressed utf8 transport of websockets.
2011-04-18 20:51:53 +02:00
Alexander Larsson
2cb9ce954e [broadway] Remove old demo code 2011-04-18 20:51:53 +02:00
Alexander Larsson
02e9b97981 [broadway] Implement wm close in browser 2011-04-18 11:50:29 +02:00
Alexander Larsson
52074b4cac [broadway] Report most special keys in keypressed
Some special key keycode values as seen in keydown actually match
normal keys (like "." has a keyCode 46 on keyPress, which is the same
as Delete, but 190 for KeyDown). So we must match the special keys on
keypress. However, some things must be checked on keydown as they are not
generating keypress events.
2011-04-18 10:55:41 +02:00
Alexander Larsson
1fdd4915fc [broadway] Make close button text unselectable 2011-04-15 20:34:32 +02:00
Alexander Larsson
7f14b8bedf [broadway] Implement gdk_window_begin_resize_drag
This makes the resize grip work.
2011-04-15 20:34:32 +02:00
Alexander Larsson
c331d397f0 [broadway] Remove window from hashtable when destroyed 2011-04-15 20:34:32 +02:00
Alexander Larsson
66231a29b8 [broadway] Ungrab if grabbed window is destroyed 2011-04-15 20:34:32 +02:00
Alexander Larsson
22c250e324 [broadway] Correctly handle ungrabs in the browser side
Always call doUngrab to get the right event, and always do this
if the grabbed window is hidden or destroyed.
2011-04-15 20:34:31 +02:00
Alexander Larsson
887743728f [broadway] Handle keyboard modifiers in state 2011-04-14 21:36:42 +02:00
Alexander Larsson
01da867dac [broadway] Emulate hardware keycodes in keyboard events
We can't really know the client side keymaps, so we use the keysym
as the hardware keycode (essentially claiming to have a keyboard with
one key for all possible keysyms). This is not ideal, but its hard to
do better with no knowledge of the client side keyboard mappings.
(And html keyboard events suck badly...)
2011-04-14 21:36:42 +02:00
Alexander Larsson
7d37534ee2 [broadway] Implement keyboard event better
We're using the noVNC keyboard even handling model (and some of the
code with permissions). This means we combine data from keydown and
keypress to figure out the translated keysyms according to the keyboard
layout at the users machine.
2011-04-14 21:36:42 +02:00
Chun-wei Fan
f9ad0c61b2 Add gdk_win32_window_get_type into gdk.symbols
This symbol needs to be exported for GDK (Win32) so that the
runtime checks for Win32 backend usage can be done on
MSVC-compiled versions of GTK+ too.

I did not add the corresponding symbols for the other backend
though-they are probably exported automatically by GCC AFAIK.

This is done to make commit
9db4accf9c
work on MSVC
2011-04-14 23:48:49 +08:00
Matthias Clasen
4a6f5a6247 Fix make dist in gdk/broadway 2011-04-13 17:48:48 -04:00
Kristian Høgsberg
f75ea21dcd wayland: Remove non-existing gdkscreen-wayland.h from SOURCES 2011-04-13 14:34:26 -04:00
Dan Winship
91b5223001 GdkDeviceManagerXI2: don't set user_time on ButtonRelease
The XI2 device manager was mistakenly setting the window user_time on
both ButtonPress and ButtonRelease, which meant that processes that
tried to launch another process based on the time of a ButtonPress
event would end up always focus-stealing-preventing the new app.

https://bugzilla.gnome.org/show_bug.cgi?id=647275
2011-04-12 12:53:47 -04:00
Matthias Clasen
611a67b350 GdkWindowImplX11: Struct packing improvements 2011-04-12 12:14:07 -04:00
Matthias Clasen
1c4cb29475 GdkX11Screen: Struct packing improvements 2011-04-12 12:13:56 -04:00
Matthias Clasen
879202b9c2 GdkX11DragContext: Struct packing improvements 2011-04-12 12:13:55 -04:00
Matthias Clasen
cef996d57e GdkX11DeviceXI: Struct packing improvements 2011-04-12 12:13:55 -04:00
Matthias Clasen
20c8b765a5 GdkScreen: Struct packing improvements 2011-04-12 12:13:55 -04:00
Matthias Clasen
220ba87ec0 GdkWindow: Struct packing improvements 2011-04-12 12:13:55 -04:00
Matthias Clasen
14ad1fab8e GdkDisplay: Struct packing improvements 2011-04-12 12:13:55 -04:00
Matthias Clasen
63c4bb5563 GdkCursor: Struct packing improvements 2011-04-12 12:13:55 -04:00
Kristian Høgsberg
c7514e8f0d Merge branch 'gdk-backend-wayland'
Conflicts:
	Makefile.am
	configure.ac
	gdk/Makefile.am
	gtk/gtksettings.c
	gtk/gtkwindow.c
2011-04-12 09:52:44 -04:00
Alexander Larsson
85c1c22d04 [broadway] Cancel key events after seeing them 2011-04-12 13:38:04 +02:00
Alexander Larsson
afdde925b8 [broadway] Fix canvas resize when resizing browser window
We always have to resize the canvas, even when its in a toplevel.
2011-04-12 11:34:13 +02:00
Alexander Larsson
20542b0ead [broadway] Fix typo 2011-04-12 11:21:47 +02:00
Alexander Larsson
f4bef2c720 [broadway] Combine window move and resize into one op
This way we avoid sending a configure event for the inbetween state
if we're resizeing and moving at the same time.
2011-04-12 11:12:39 +02:00
Alexander Larsson
ca49ec2c8c [broadway] Fix various js warnings 2011-04-12 11:12:39 +02:00
Alexander Larsson
840df5c7c1 [broadway] Add stacktrace debugging functions 2011-04-12 11:12:39 +02:00
Alexander Larsson
2934569781 [broadway] Always send configure events from browser
As soon as something changes, even if it was a request from the user
we send a configure event. If not we might race with a app-side
generated configure event.

For instance, a create + resize might create only a configure event for
the create in the browser, but that may get to the app after the app-side
configure event for the resize, overriding the new size.
2011-04-12 11:12:39 +02:00
Alexander Larsson
ddcbd8234b [broadway] When resyncing, first create all windows then set attributes
Some attributes (like transient parent) depende on other windows being
there, so we create all first.
2011-04-12 11:12:39 +02:00
Alexander Larsson
4bbc45380b [broadway] More complete handling of transient parent
We now handle any order of transient being set and windows shown/created
2011-04-12 11:12:39 +02:00
Alexander Larsson
75dc3f3a07 [broadway] Use mozInnerScreenX & co to get window position
This way we don't have to rely on any event, which won't work until
we get an event.
2011-04-12 11:12:38 +02:00
Alexander Larsson
8a7e208bb2 [broadway] Parse x/y as signed 2011-04-12 11:12:38 +02:00
Alexander Larsson
4cb979d6b9 [broadway] Update window geometry after showing window 2011-04-12 11:12:38 +02:00
Alexander Larsson
4c575ac343 [broadway] Don't cache surface.transientToplevel as that might change at various times 2011-04-12 11:12:38 +02:00
Alexander Larsson
7b3b4a6ad9 [broadway] Correctly track remote visible state
GDK_WINDOW_IS_MAPPED is not false for withdrawn windows, so we need
to track real visibility ourselves.
2011-04-11 12:09:43 +02:00
Alexander Larsson
33d16b16c9 [broadway] Clean up js side surface handling
* Always calculate the context, don't store in surface.
* Store the toplevel element (frame or canvas) for easy access.
* Always use visibility hidden rathern than display none to hide windows,
  as this means we can always rely on dom positioning info.
2011-04-11 12:09:43 +02:00
Alexander Larsson
27c4d104fb [broadway] Restack on window show to ensure all zIndexes are right 2011-04-11 12:09:43 +02:00
Alexander Larsson
c839f2910c [broadway] Store surface, not id in stackingOrder list 2011-04-11 12:09:43 +02:00
Alexander Larsson
ace1c4c284 [broadway] Set transient-for before showing window
When syncing windows, make sure we set transient-for before showing
the window to avoid it being visible with the wrong transient-for
(i.e. possibly on the wrong browser window).
2011-04-11 12:09:43 +02:00
Alexander Larsson
05dfb7f594 [broadway] Fix css typo
rgb takes 3 params, rgba takes four.
2011-04-11 12:09:43 +02:00
Alexander Larsson
7a197e5b65 [broadway] Fix up frame size calculation
Turns out that offsetTop/Left doesn't contain the border, so we need
to manually add that in.
2011-04-11 12:09:43 +02:00
Alexander Larsson
2728cc9508 [broadway] Remove expensive transparency effects from css 2011-04-10 21:10:07 +02:00
Alexander Larsson
d6beabbff2 [broadway] Make the toplevel mode a url parameter 2011-04-10 20:16:13 +02:00
Alexander Larsson
fe79bbd618 [broadway] Position non-popup windows ourselves
We ignore the initial positions for non-popup windows, instead we
place the windows ourselves (or in the useToplevel mode by the WM).
2011-04-10 20:16:13 +02:00
Alexander Larsson
e5d8905cd2 [broadway] Fix up toplevel content visibility in useToplevel mode
surfaces.canvas may change if we move to another document, so
reupdate the element to show after ensureSurfaceInDocument.
2011-04-10 20:16:13 +02:00
Alexander Larsson
fadaced85f [broadway] Move window to top when moving 2011-04-10 20:16:13 +02:00
Alexander Larsson
618dc872b0 [broadway] Add some initial work for in-window frames
The css is based on work by Jasper St Pierre:
http://magcius.mecheye.net/vista/
2011-04-10 20:16:13 +02:00
Alexander Larsson
69eafcc3c5 [broadway] Fix some typos in the js code 2011-04-10 20:16:13 +02:00
Alexander Larsson
930e43c710 [broadway] Use the right doctype for html5 2011-04-10 20:16:13 +02:00
Tristan Van Berkom
d2303bafae Fix some crashes caused by unimplemented functions in GdkOffscreenWindow
These crashes happen when accessing GtkWindow properties and the
GdkWindow is an offscreen (fixes https://bugzilla.gnome.org/show_bug.cgi?id=647244)
2011-04-09 02:00:18 +09:00
Matthias Clasen
fbf1093d5c Free the translate queue when closing a display
Not that many people are ever going to hit this.
https://bugzilla.gnome.org/show_bug.cgi?id=645236
2011-04-08 21:34:25 -04:00
Matthias Clasen
9e6d3d969c Fix some possible crashes if the default display is NULL
Unlikely that many people will hit these, but still.
https://bugzilla.gnome.org/show_bug.cgi?id=645176
2011-04-08 21:20:26 -04:00
Carlos Garnacho
db74a6e816 GdkDevice: Remove duplicate private function
_gdk_device_get_axis_use() dates back to pre-sealing, when the
xi2 work began, this remaining can be gone with a public
gdk_device_get_axis_use() function already in place.
2011-04-08 16:39:45 +02:00
Alexander Larsson
955f01cdf7 [broadway] Enable useToplevelWindow by default for now 2011-04-07 21:16:52 +02:00
Alexander Larsson
7128087cb4 [broadway] Implement selections 2011-04-07 20:21:22 +02:00
Alexander Larsson
cad40b24e2 [broadway] Remove unused hashtables 2011-04-07 20:20:51 +02:00
Alexander Larsson
d12a9a5e99 [broadway] Add gdk_broadway_display_get_last_seen_time 2011-04-07 20:18:13 +02:00
Alexander Larsson
42cbed6759 [broadway] Fix up header guards to not refer to gdkx.h 2011-04-07 20:04:48 +02:00
Alexander Larsson
f0e1115f80 [broadway] Add gdkbroadway.h public header 2011-04-07 19:25:16 +02:00
Alexander Larsson
095ccf9c11 [broadway] Serialize event times
Event times come from the browser and may change weirdly when we reconnect
with another browser, so we normalize these to be strictly increasing
and with a 5 second gap for each reconnect.
2011-04-07 19:12:51 +02:00
Alexander Larsson
9d974ca13a [broadway] Fix typo in implicit grab support
We do an implicit grab if there is no grab already, not only if there is
one.
2011-04-07 15:26:37 +02:00
Alexander Larsson
dd07f534f4 [broadway] Handle screen size
Without this menu placement doesn't work right
2011-04-07 15:10:39 +02:00
Alexander Larsson
8c20b476df [broadway] Track and report last and future state
This fixes the drawing area demo in gtk-demo
2011-04-07 14:36:30 +02:00
Alexander Larsson
1a7b76d49d [broadway] Report mouse pointer coordinates right
The windows argument to device_query_state can be a client side
window, but we must only handle the "native" part of it (i.e.
window->impl->wrapper).
2011-04-07 14:29:26 +02:00
Alexander Larsson
43aac66458 [broadway] Fix all unnecessary warnings 2011-04-07 10:03:17 +02:00
Alexander Larsson
3b1fe05e78 [broadway] Wire up the delete event 2011-04-07 10:03:17 +02:00
Alexander Larsson
06fc6e007e [broadway] Report right root coors in toplevel mode 2011-04-07 10:03:17 +02:00
Alexander Larsson
adc05ae6b7 [broadway] Add configure event for browser-side geometry changes
Atm this only works for the useToplevelWindows case, but we can add
a browser wm to make use of it inside the browser too.
2011-04-07 10:03:17 +02:00
Alexander Larsson
1365e93fad [broadway] Add experimental toplevel window mode
This mode makes each toplevel window get its own browser window, with
popup windows using the browser window of their transient parent.

Its not idea, as you can't get rid of all browser chrome by default, and
it means popups (like menus) can't extend outside the toplevels. But, it is
kinda cool.
2011-04-07 10:03:17 +02:00
Alexander Larsson
8831efa735 [broadway] Fixup ungrab reference to old time variable 2011-04-07 10:03:17 +02:00
Alexander Larsson
05bda376f6 [broadway] Break out document setup into its own function
In the future we might have more documents (one per toplevel browser
window).
2011-04-07 10:03:17 +02:00
Alexander Larsson
06ad0f52e2 [broadway] Remove unused grab.time on browser side 2011-04-07 10:03:17 +02:00
Alexander Larsson
f53771cc1d [broadway] Break out all command handling to separate functions
We don't want to mix up the argument parsing with the actual implementation.
2011-04-07 10:03:17 +02:00
Alexander Larsson
7c20d59411 [broadway] Make the surface object a plain js object, not the context 2011-04-07 10:03:17 +02:00
Alexander Larsson
9f848aaf30 [broadway] Centralize surface creation code in js 2011-04-07 10:03:17 +02:00
Alexander Larsson
199cd1548f [broadway] Track window type in browser 2011-04-07 10:03:17 +02:00
Alexander Larsson
9c5c4223e3 [broadway] Track transient_for 2011-04-07 10:03:17 +02:00
Alexander Larsson
e1dcd6735e [broadway] Remove unused query pointer message 2011-04-07 10:03:16 +02:00
Alexander Larsson
5b645357d6 [broadway] Don't roundtrip for getting current pointer location
Roundtrips are bad, and this gets called a lot, so we use all currently
availible future info to "emulate" a full roundtrip, but with much lower
cost.
2011-04-07 10:03:16 +02:00
Alexander Larsson
a0048d5e70 [broadway] Add _gdk_broadway_display_consume_all_input
This parses and queues all currently availible input data non-blockingly.
Useful to ensure the latest up-to-date future info.
2011-04-07 10:03:16 +02:00
Alexander Larsson
fdc2059edb [broadway] Track future pointer events locations during parsing
We want this info so that we can avoid roundtrips and still get
a somewhat better querying for pointer locations.
2011-04-07 10:03:16 +02:00
Alexander Larsson
1fa952fb04 [broadway] Add helper for processing input at idle 2011-04-07 10:03:16 +02:00
Alexander Larsson
e113cf26fb [broadway] Keep track of current real cursor window (sans grabs)
We need this to be able to do a non-roundtripping get-window.
2011-04-07 10:03:16 +02:00
Alexander Larsson
ee1657d88e [broadway] Break out _gdk_broadway_display_read_all_input_nonblocking
This is useful in other places, like when we want to iterate over
all messages recieved so far.
2011-04-07 10:03:16 +02:00
Alexander Larsson
d664e78c94 [broadway] Make pointer grabs not roundtrip
Since we're really only initializing grabs (except for implicit
grabs at least) from the client side we might as well do all the grab
time checks on the client side to avoid unnecassary roundtrips.
2011-04-07 10:03:16 +02:00
Alexander Larsson
56d05e093d [broadway] Save last event time seen 2011-04-07 10:03:16 +02:00
Alexander Larsson
8aad17592e [broadway] Parse broadway input messages earlier
We now parse the broadway messages as soon as they are read from the wire.
This will let us sanely do lookahead in the message queue later.
2011-04-07 10:03:15 +02:00
Matthias Clasen
d46f0db38b Make gdk_x11_window_set_theme_variant do nothing for non-toplevels
This avoids problems when calling this e.g. on offscreen windows.
2011-04-03 17:40:37 -04:00
Matthias Clasen
2226996b80 Keymap: properly initialize lock state
We need to get explicitly lock state initially, before we can
rely on state changed events to track it.
https://bugzilla.gnome.org/show_bug.cgi?id=645341
2011-04-03 17:39:31 -04:00
Matthias Clasen
31c036b9b4 Call _exit instead of exit from X error handlers
This is because running atexit() handlers from there is
usually bad news.
https://bugzilla.gnome.org/show_bug.cgi?id=646338
2011-03-31 19:59:00 -04:00
Garrett Regier
793d12d70d Fix leaking calls to gdk_device_manager_list_devices()
gdk_device_manager_list_devices() returns a newly allocated list.

https://bugzilla.gnome.org/show_bug.cgi?id=645234
2011-03-21 10:37:10 -04:00
Garrett Regier
8d3810b0b6 Free the motion hint infos in GdkDisplay
https://bugzilla.gnome.org/show_bug.cgi?id=645235
2011-03-21 10:23:25 -04:00
Florian Müllner
3032fdce2a window: Export theme variant to X11
The metacity theme format allows to use colors from the current
GTK+ theme in window decorations. Since GTK+ now gained support
for dark theme variants, window managers using that theme format
(metacity, mutter, compiz via gtk-window-decorator) should be able
to use colors from the correct variant; so in case a variant is
requested, export it in the _GTK_THEME_VARIANT property on
toplevel windows.

https://bugzilla.gnome.org/show_bug.cgi?id=645354
2011-03-21 15:06:34 +01:00
Dan Winship
605c383c78 GdkDeviceManagerXI2: process send_event core events
XSendEvent doesn't currently work with XI2 events, so add code to
translate core events when they have the send_event flag.

(We still don't actually select for core pointer/keyboard events, so
we will only receive send_event events that are sent with a 0
event_mask.)

https://bugzilla.gnome.org/show_bug.cgi?id=644847
2011-03-17 17:18:33 -04:00
Jasper St. Pierre
6ecfddf2e2 gdkkeyuni: Fix DEL for binary search
The list needs to be sorted in order for the binary search to work properly.

https://bugzilla.gnome.org/show_bug.cgi?id=644976
2011-03-16 20:09:13 -04:00
Matthias Clasen
66a77d0bc0 Make gdk_keyval_to_unicode return more codes
Previously, we didn't map ASCII controls to their Unicode
counterparts. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=644836
2011-03-16 12:48:59 -04:00
Cosimo Cecchi
69b9794d9e broadway: fix a build warning 2011-03-16 10:48:24 -04:00
Alexander Larsson
4fadd346fa Merge branch 'broadway' 2011-03-15 13:00:24 +01:00
Alexander Larsson
9a26fd25af broadway: Enable TCP_NODELAY for output socket
This makes us send data immediately, giving a much snappier
over-network experience.
2011-03-15 11:47:38 +01:00
Alexander Larsson
7605258890 broadway: Fix up whitespace and indentation for js code 2011-03-15 10:33:08 +01:00
Alexander Larsson
520dd09e8a broadway: Use camelCase for all js code 2011-03-15 10:26:53 +01:00
Alexander Larsson
2635a27814 broadway: Fix flicker when resizing windows
Resizing a canvas causes a clear, so we have to save the previous
content and restore to avoid flickering.
2011-03-15 10:18:07 +01:00
Alexander Larsson
e3a2176a1f broadway: double buffer window updates
Ensure that we're writing all the updates for a single rendering op
in one go without callbacks inbetween. That way some rendering will
be delayed, but the user will never see partial renderings.
2011-03-15 09:50:07 +01:00
Alexander Larsson
58c234e7d0 broadway: Don't crash if output is NULL 2011-03-15 08:50:18 +01:00
Alexander Larsson
4408e9d958 broadway: Implement gdk_broadway_device_window_at_position
This is required for ungrabs to work properly
2011-03-14 21:40:59 +01:00
Alexander Larsson
08f832908e broadway: Ensure we begin a path when clipping 2011-03-14 20:59:28 +01:00
Alexander Larsson
acd72d0961 broadway: Do copy rects with compositing mode "copy" 2011-03-14 20:59:00 +01:00
Alexander Larsson
a5e5e2343c broadway: Fix undefined variable error in js 2011-03-14 16:38:24 +01:00
Alexander Larsson
63c0198347 broadway: Start windows transparent rather than black
This avoids flashing
2011-03-14 16:04:34 +01:00
Alexander Larsson
084003953d broadway: Make broadway port configurable with BROADWAY_DISPLAY 2011-03-14 15:58:55 +01:00
Alexander Larsson
9214796a4d broadway: Report right coordinates on ungrab enter 2011-03-14 15:46:29 +01:00
Alexander Larsson
99d194b747 broadway: Fix various typos in mouse button event reporting 2011-03-14 15:24:25 +01:00
Alexander Larsson
ca203adc73 broadway: Fix up grab events, its "mode" not "detail" we send 2011-03-14 12:13:21 +01:00
Alexander Larsson
a1de735b87 broadway: Track button state 2011-03-14 12:09:19 +01:00
Alexander Larsson
e53abee805 broadway: Fix time in ungrab 2011-03-14 12:02:18 +01:00
Alexander Larsson
95b19bca33 broadway: Implement pointer grabs 2011-03-14 11:52:46 +01:00
Alexander Larsson
7d2ff79ddf broadway: Fix some window coordinate reporting issues 2011-03-14 11:28:57 +01:00
Alexander Larsson
cf6bf44184 broadway: Remove debug code and fix whitespace issues 2011-03-14 11:21:37 +01:00
Alexander Larsson
c2ce462486 broadway: Add debug logging framework for js 2011-03-14 10:05:24 +01:00
Alexander Larsson
e2f8215751 broadway: Fix typo that broke window hiding 2011-03-14 09:51:54 +01:00
Alexander Larsson
6713fe9ca4 broadway: Get query_state window coords from browser side 2011-03-11 21:39:11 +01:00
Alexander Larsson
27848432c7 broadway: Split out getPositionsFromAbsCoord from getPositionsFromEvent 2011-03-11 21:28:39 +01:00
Alexander Larsson
54905a8986 broadway: Fix up a bunch of js style issues 2011-03-11 21:12:57 +01:00
Alexander Larsson
cc808ae063 broadway: Move event coordinate calculation to browser side 2011-03-11 21:10:23 +01:00
Alexander Larsson
0cefd54122 broadway: Implement pointer query_status 2011-03-11 14:56:31 +01:00
Alexander Larsson
614eb3b3d7 broadway: Add _gdk_broadway_display_block_for_input 2011-03-11 14:45:13 +01:00
Alexander Larsson
e08396450d broadway: Break out websockets parsing and message processing
We need this to be able to correctly handle the recieve buffer
during message processing. Without the split we would be
recursing over the use of it.
2011-03-11 14:41:03 +01:00
Alexander Larsson
7c12e5f27e broadway: Implement gdk_display_flush 2011-03-11 14:37:39 +01:00
Alexander Larsson
71aa55d291 broadway: Call device vfunc to get device state
We want only one place where we get device state.
2011-03-11 08:26:37 +01:00
Benjamin Otte
0c37c88147 gdk: Use CAIRO_OPERATOR_SOURCE when painting double-buffered buffer
Otherwise RGBA surfaces will have issues.

This patch only affects non-implicit paints, ie no paints at all in the
real world.
2011-03-11 02:10:47 +01:00
Benjamin Otte
2a2ad8523f gdk: Add GDK_RENDERING environment variable
It's useful for debugging rendering issues, both correctness and
performance wise.

See the added documentation for what it does and how it works.
2011-03-11 02:10:47 +01:00
Alexander Larsson
0fa32e98a4 broadway: Change input handling to use polling rather than async reads
We do this because we need to be able to switch to using sync reads
when we're doing a roundtripping call, and that is too complex
with the async code.
2011-03-10 21:22:19 +01:00
Alexander Larsson
d4e2414d4a broadway: Add serial tracking and roundtripping 2011-03-10 14:58:47 +01:00
Alexander Larsson
3914d0af38 broadway: Clean up protocol message writing a bit
Centralize the header writing so we can extend it later.
Don't opencode the size of element when increasing p.
2011-03-10 13:59:30 +01:00
Alexander Larsson
4765f37484 Merge branch 'gtk-3-0' into broadway
Conflicts:
	gdk/gdkdisplaymanager.c
2011-03-10 10:51:04 +01:00
Tristan Van Berkom
713fd43c8f Fixed gdk_window_beep() to pass the toplevel instance to the toplevel's implementation vfunc.
This incorrect assignment would cause asynchronous aborts from the X server
(they would occur if for instance, an offscreen GtkTreeView calls
gtk_widget_error_bell()).
2011-03-10 14:10:32 +09:00
Alexander Larsson
a3b2840cae Remove support for GDK_NATIVE_WINDOWS
GDK_NATIVE_WINDOWS was a way to keep some old apps running that did weird
things in gtk2. We should not have to carry this forwards in gtk 3.x.

We do however keep a g_warning() call reminding people of this fact to
ease debugging when they try to port their applications.

https://bugzilla.gnome.org/show_bug.cgi?id=644119
2011-03-08 23:13:39 +01:00
Benjamin Otte
8d1b7362b3 x11: Copy from actual window, not parent
This code is a relic from GTK2 days and should not be necessary anymore,
as code now makes sure to only copy those parts of the window that are
not overlapped by parent windows.

By deleting it we fix potential issues with composited and translucent
windows copying the wrong data.

https://bugzilla.gnome.org/show_bug.cgi?id=643416
2011-03-07 17:45:08 +01:00
Carlos Garcia Campos
7aeb3c725b xi2: Ignore button release events of button 4-7
We treat button presses of button 4-7 as scroll wheel events, so release
events should be ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=643925
2011-03-06 12:42:02 +01:00
Matthias Clasen
1442fe9694 Don't distribute gdkconfig.h
https://bugzilla.gnome.org/show_bug.cgi?id=643440
2011-03-02 22:17:02 -05:00
Kristian Høgsberg
fcd58b0ffd wayland: Add modifier masks for meta, hyper and super keys
Makes alt keybindings work in vte.
2011-03-01 11:33:07 -05:00
Kristian Høgsberg
0e1041a8af wayland: Add another cursor (left-ptr) 2011-03-01 11:32:05 -05:00
Michael Natterer
033bd235b7 gdk: add precondition checks to many GdkDisplay functions
instead of crashing in GDK_DISPLAY_GET_CLASS(NULL)->foo(NULL);
2011-02-28 17:36:06 +01:00
Michael Natterer
8ee9e132e1 gdk: gdk_x11_device_xi2_get_state(): move stuff to local scope 2011-02-27 15:06:41 +01:00
Matthias Clasen
7df2ce8eab Drop _gdk_x11_set_input_focus_safe
All that this function did was to asynchronously catch errors.
Since we have asynchronous error traps now, we can just use
XSetInputFocus().
2011-02-26 22:16:01 -05:00
Kristian Høgsberg
287d91e5f9 Merge remote-tracking branch 'origin/master' into gdk-backend-wayland
Conflicts:
	gdk/gdkdisplaymanager.c
2011-02-26 14:44:29 -05:00
Carlos Garcia Campos
651410fa2a Copy event axes for double/triple click events in gdk_event_copy()
Button event axes for double/triple click events are freed by
gdk_event_free(), so copy them to avoid an invalid free when releasing a
copied event.
2011-02-25 09:13:35 +01:00
Alexander Larsson
0b0f110152 Avoid spurious emissions of monitors-changed
The monitor change detection code in _gdk_x11_screen_size_changed() and
process_monitors_change() goes to some length to make sure its only emitted
when there is an actual change to the data visible via the GdkScreen monitors
api.

However, commit 662e69ad added some code that always emits "monitors-changed"
in _gdk_x11_screen_size_changed when we have randr13 and get a ConfigureNotify
on the root window (even though we may already have emitted it in the
RRScreenChangesNotify event!).

As far as I can tell this is due to a comment in the bug referenced by the
commit (https://bugzilla.gnome.org/show_bug.cgi?id=601712#c4) where it says:

  This version of the patch changes GdkDisplay to emit "monitors-changed" when
  the primary monitor changes (see the change in _gdk_x11_screen_size_changed).

And, if you remove this part of the change the signal is not emitted when just
the primary is changed. However, this is not really the right approach. We
should just also check for if the primary changes in process_monitors_change()
to avoid spurious signal emissions.

https://bugzilla.gnome.org/show_bug.cgi?id=643216
2011-02-24 19:47:02 +01:00
Murray Cumming
f91c04e284 Minor documentation improvements
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01:00
Murray Cumming
31419f2026 GdkDevice: Minor improvement to the overview documentation.
The last paragraph still seems to be out of place though, as if it
was a previous attempt at an overview or part of some older text
elsewhere.

This overuses the passive too.
2011-02-23 09:37:06 +01:00
Marc-André Lureau
f598f75dfb gdk_cursor_new_from_pixmap: Fix gdk_display_is_closed call
This was typoed in commit dfe6ba932c
https://bugzilla.gnome.org/show_bug.cgi?id=642843
2011-02-20 20:11:13 -05:00
Tor Lillqvist
acc01ac944 Tweak include order a bit to get around compilation errors
wintab.h defines an INT() macro that interfers with some lines in
commctrl.h.
2011-02-20 23:56:13 +02:00
Tor Lillqvist
8e6932f46e Handle emulated keyboard input that arrives as VK_PACKET
Fixes bug #642772. Thanks to the anonymous bug reporter for providing
a test program.
2011-02-20 01:39:13 +02:00
Carlos Garnacho
3f78b251b9 Free event axes for double/triple click events.
The button event axes are copied over when synthesizing
these events, so free them as well in gdk_event_free().
2011-02-17 20:45:32 +01:00
Martin Nordholts
a3f52949c4 Bug 633291 - Handle Shift-keys in X11 gdk_test_simulate_key()
If a level 1 key maps to a key value passed to
gdk_test_simulate_key(), raise the GDK_SHIFT_MASK flag so the reqested
key value is generated. Also add a regression test for this fix.
2011-02-13 12:57:01 +01:00
Benjamin Otte
33a46dd553 gdk: Select the X11 backend a the last possible backend
On Windows and OS X we want to prefer the native backends over the X11
backend.
On Linux, nothing changes as nobody is going to enable those backends
(and if they do, they'll know what they get).
2011-02-12 22:09:58 +01:00
Matthias Clasen
728a45fc1f Remove confusion over XI2 defines
Some places were using XINPUT_2, others XINPUT_XI2. Since configure
defines XINPUT_2, use that throughout.
2011-02-11 23:30:01 -05:00
Benjamin Otte
de9a082ddb x11: Make headers identical no matter if we run with or without XI2
Previously we weren't installing the device headers when compiling
without XINPUT support. But we would include them from gdkx.h, so
essentially the build was broken.

With this patch the types will exist but not do anything.
2011-02-12 01:27:40 +01:00
Benjamin Otte
30abd4d8b5 x11: Fix struct definition for GdkDeviceManagaerXI2 2011-02-12 00:16:03 +01:00
Benjamin Otte
e9ff457a40 x11: Make the device manager struct actually subclass the correct device 2011-02-11 23:53:14 +01:00
Benjamin Otte
b1f2e5bfa3 x11: Fix build without Xinput
Missing ifdefs
2011-02-11 23:21:11 +01:00
Kristian Høgsberg
b5134619a0 wayland: Map transient surfaces as such 2011-02-11 17:20:14 -05:00
Kristian Høgsberg
1cd65aea53 wayland: Only set x, y, and modifiers if the pointers are non-NULL 2011-02-11 17:07:19 -05:00
Kristian Høgsberg
152dca40d3 wayland: Remove window cursor hash 2011-02-11 10:06:56 -05:00
Alexander Larsson
d8f061ad42 [broadway] Update to new GDK backend APIs 2011-02-11 15:59:50 +01:00
Kristian Høgsberg
ffe3af7f1c wayland: There's only one screen 2011-02-11 09:56:58 -05:00
Kristian Høgsberg
6eac07d4f6 wayland: Trim some unused struct fields 2011-02-11 09:50:10 -05:00
Alexander Larsson
e68774325e [broadway] Update to new library name 2011-02-11 15:38:41 +01:00
Alexander Larsson
d4add8cefa Merge branch 'master' into broadway 2011-02-11 15:27:54 +01:00
Chun-wei Fan
7cb41b6561 gdk/gdkconfig.h.win32: Make it more up-to-date
Make this pre-configured file to be more like the one used by the existing
X11 version, but using GDK_WINDOWING_WIN32 for obvious reasons.
2011-02-11 18:07:05 +08:00
Kristian Høgsberg
f2ac8c7ce3 wayland: Drop empty gdkscreen-wayland.h 2011-02-10 23:00:12 -05:00
Kristian Høgsberg
4ca3e53a3e wayland: Drop GdkToplevelWayland and gdkwindow-wayland.h 2011-02-10 22:51:23 -05:00
Kristian Høgsberg
cd91551075 wayland: Fix resizing from other corners than just botton-right 2011-02-10 22:37:51 -05:00
Kristian Høgsberg
cfb9c840e5 wayland: Remove some fprintf debug messages 2011-02-10 22:22:42 -05:00
Kristian Høgsberg
6d20bcb848 wayland: Fix hiding and withdrawing surfaces 2011-02-10 22:21:08 -05:00
Kristian Høgsberg
22b9132ae5 wayland: Keep a reference to the surface we last attached 2011-02-10 22:04:26 -05:00
Kristian Høgsberg
3b205de896 wayland: Port over missing xkb functionality from X11 backend 2011-02-10 20:34:14 -05:00
Kristian Høgsberg
0db8663e44 wayland: Copy gdk_wayland_keymap_translate_keyboard_state from X11 backend 2011-02-10 16:35:38 -05:00
Kristian Høgsberg
f0fe810999 wayland: Adjust the hw keycode in key events for min_key_code 2011-02-10 16:34:40 -05:00
Matthias Clasen
524ce69bcb Bump the version to 3.0.0
At the same time, change the library sonames for -3.0 to just -3.
This is necessary since the 2.99 releases installed libraries like
libgtk-3.0.so.0.9903.0, and we want to prevent the library version
number from jumping back. So 3.0 will have libgtk-3.so.0.0.0.
2011-02-10 14:41:02 -05:00
Kristian Høgsberg
c3955ea0c2 wayland: Add a few more cursors 2011-02-10 14:08:53 -05:00
Kristian Høgsberg
df0815470c wayland: Return surface coordinates and mask in window_at_position 2011-02-10 13:42:59 -05:00
Kristian Høgsberg
4621c6476c wayland: Send visibility event after map 2011-02-10 11:02:15 -05:00
Kristian Høgsberg
9e1a0a1bec wayland: Fix indentation 2011-02-10 11:02:15 -05:00
Kristian Høgsberg
df57389190 wayland: Unref the keyboard focus surface when losing keyboard focus 2011-02-10 11:02:15 -05:00
Kristian Høgsberg
f62e4a02b6 wayland: Use GDK_NOTE for logging event debug messages 2011-02-10 11:02:15 -05:00
Kristian Høgsberg
9f0ed18d5a wayland: Set event screen 2011-02-10 10:57:33 -05:00
Kristian Høgsberg
1b918d1b93 wayland: Pretend selection works, print debug message 2011-02-10 10:54:10 -05:00
Kristian Høgsberg
3beb09adca wayland: Copy translate_keyboard_string() form x11 backend 2011-02-10 10:53:31 -05:00
Kristian Høgsberg
0583603b09 wayland: Actually return device in _gdk_wayland_device_get_device() 2011-02-10 10:49:51 -05:00
Kristian Høgsberg
f7f1b59e05 wayland: Handle blank cursor 2011-02-10 10:49:09 -05:00
Kristian Høgsberg
de82b82dd8 wayland: Clear modifier mask before restoring from keyboard_focus value 2011-02-09 16:36:15 -05:00
Kristian Høgsberg
c36dfccc64 wayland: Consolidate device and devicemanager implementation 2011-02-09 15:27:08 -05:00
Kristian Høgsberg
3ef3433511 wayland: Support setting cursors
And a handful unrelated cleanups.  Still doesn't really have an answer
for cursor themes.
2011-02-09 14:48:31 -05:00
Matthias Clasen
8291530abf More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
Garrett Regier
adef25626e Fix annotation that broke the docs
It was added in 0e795b67c3
and removed in f6cc08fa57.
2011-02-08 23:06:42 -08:00
Matthias Clasen
1f4bb70bac Give the GDK docs some love
Reorganize some sections, drop the largely redundant multihead
section, add some more information about multiple backends.
2011-02-09 01:32:24 -05:00
Matthias Clasen
f6cc08fa57 Remove annotation that breaks the docs
Before adding annotations, please check that gtk-doc can handle
them. Else they will be stripped out again.
2011-02-08 20:00:27 -05:00
Kristian Høgsberg
546069f434 wayland: Use wayland-egl 2011-02-08 16:02:22 -05:00
Johan Dahlin
60e0acfc11 Remove tab as it confused g-ir-scanner 2011-02-08 13:20:53 -02:00
Colin Walters
7711f9fad4 introspection: Remove redundant include
Gdk-3.0 is already included above via --include-uninstalled, so
don't also specify it in INCLUDES.  Doing so breaks if it isn't
installed already, since we try to find the gdk-3.0.pc.
2011-02-08 10:16:55 -05:00
Kristian Høgsberg
541d5172dd Track 2.99.3 API changes 2011-02-08 08:12:59 -05:00
Benjamin Otte
c1f8330a28 gdk: Fix typo in documentation string 2011-02-08 08:58:49 +01:00
Hans Breuer
b41ee31a16 win32: no more GdkNativeWindow and related changes
- replace GdkNativeWindow with HWND, remove type casts
 - no more GdkDisplayClass::get_drag_protocol but GdkWindowImpl::get_drag_protocol
 - remove *_client_message*()
2011-02-06 15:07:13 +01:00
Kristian Høgsberg
1149c342bf Clean up buffer handling a bit 2011-02-05 16:11:55 -05:00
Kristian Høgsberg
846e2c0eee Remove leftover _gdk_windowing_set_cairo_surface_size() 2011-02-05 16:11:55 -05:00
Kristian Høgsberg
a65fcd0859 Hook up xkb_keysym_to_string and xkb_string_to_keysym 2011-02-05 16:11:55 -05:00
Kristian Høgsberg
7d29070faf Implement GdkKeymap using libxkbcommon 2011-02-05 16:11:55 -05:00
Kristian Høgsberg
799279daf0 Invalidate window on configure
This will trigger a repaint of the window, but it may be more efficient
to just copy back the old surface contents and let gtk+ just update the
changed parts.
2011-02-05 16:11:54 -05:00
Kristian Høgsberg
56de871bf3 Create and attach buffer at process_updates time
This way we don't try to show the buffer until we've handle the initial
expose.
2011-02-05 16:11:54 -05:00
Kristian Høgsberg
7bbc158217 Remove copy of grab enum that's now in wayland core 2011-02-05 16:11:54 -05:00
Kristian Høgsberg
e6c1f5d94d Dont iterate the display if there's nothing to write 2011-02-05 16:11:54 -05:00
Kristian Høgsberg
590f3dfa1f Add Wayland backend 2011-02-05 16:11:54 -05:00
Matthias Clasen
eaba2cd468 XI2: translate group state back into core state
This is necessary to make the key event translation work
as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=641367
2011-02-04 21:11:40 -05:00
Matthias Clasen
d4c1dbe3d7 Pass group state to _gdk_x11_device_xi2_translate_state
This will be necessary to make groups work with XI2.
2011-02-04 21:11:40 -05:00
Matthias Clasen
2c352f51a0 Share code to fill GdkEventKey.string
This code was duplicated between the core and XI2 device manager
implementations.
2011-02-04 21:11:40 -05:00
Matthias Clasen
08f90b71a2 Add translation entries for more common keysyms
In particular, the XF86 keysyms can benefit from a translation
that strips the prefix.
2011-02-04 15:33:36 -05:00
Matthias Clasen
9ba009a8eb Remove debug spew 2011-02-04 14:05:22 -05:00
Matthias Clasen
272aa7bc55 XI2: don't translate button releases as scroll events
This fixes scroll-by-2 sympoms seen in combo boxes.
https://bugzilla.gnome.org/show_bug.cgi?id=639846
2011-02-04 12:54:44 -05:00
Tristan Van Berkom
b51f3ffffc Added set_transient_for() implementation for GdkOffscreenWindow
Just a noop that is better than crashing in the case this is called
(it can be called for a toplevel GtkWindow that is parented into
another widget by setting gtk_widget_set_parent_window to an offscreen
window).
2011-02-03 23:52:12 +09:00
Martin Pitt
0e795b67c3 [GI] Mark mis-detected constructors as such
constructors which take an object of the same class as its first argument are
mis-detected as method call with "self" argument by the GIR scanner. Using the
new (constructor) annotation from bug 561264, mark some of them as proper
constuctors, so that you can call them with NULL as first argument from
bindings; in particular, this fixes gdk_window_new() and the
gtk_radio_button_new_with*() constructors.
2011-02-02 15:11:06 +01:00
John Ralls
cfaed624be Update quartz to reflect deletion of GdkNativeWindow and client_message functions. 2011-02-01 13:53:00 -08:00
Benjamin Otte
5f594b613e API: gdk: Get rid of GdkNativeWindow
Also get rid of the GDK_NATIVE_WINDOW_POINTER define.
2011-02-01 18:51:57 +01:00
Benjamin Otte
7b5ad65e71 x11: Use Window isntead of GdkNativeWindow 2011-02-01 18:51:57 +01:00
Benjamin Otte
44c02fcbb1 API: gdk: Change get_drag_window() API
The previous function gdk_drag_get_protocol_for_display() took native
window handles, so it had to be changed. Because it didn't do what it
was named to do (it didn't return a protocol even though it was named
get_protocol) and because it doesn't operate on the display anymore but
on the actual window, it's now called gdk_window_get_drag_protocol().
2011-02-01 18:51:57 +01:00
Benjamin Otte
9210347600 API: gdk: Make GDK_DRAG_PROTOCOL_NONE equal to 0
THis way, we can do comparisons like "if (protocol)"
2011-02-01 18:51:57 +01:00
Benjamin Otte
5bc04bc07b API: gdk: Make GdkEventSelection.requestor a GdkWindow
instead of a GdkNativeWindow. Also change gdk_selection_notify() API to
take a GdkWindow to match this change.
2011-02-01 18:51:57 +01:00
Benjamin Otte
c2a5d715d5 x11: Use gdk_x11_window_foreign_new_for_display() unconditionally
gdk_x11_window_lookup_window() calls are done by this function alreayd,
so no need to do them manually.
2011-02-01 18:51:57 +01:00
Matthias Clasen
5441ecd350 Fix a warning 2011-02-01 09:48:32 -05:00
Matthias Clasen
38045e789c Remove a dead member
The client_pointer field in GdkX11DeviceManagerXI2 is not used anywhere.
2011-02-01 09:44:33 -05:00
Matthias Clasen
c79413a1df Make xim work with XI2
We cannot totally ignore core key events, since XFilterEvent generates
those at times and relies on them having an effect.
https://bugzilla.gnome.org/show_bug.cgi?id=640965
2011-02-01 09:42:53 -05:00
Benjamin Otte
c332ac207a gdk: Remove GdkEventClient
... and all APIs making use of it.

That code like it hasn't been touched in years, Google codesearch
didn't find any users and most importantly it's a horrendous API, so
let's just make it die instead of having to port it over to
non-GdkNativeWindow usage, which would be required for multi-backend
GDK.

http://mail.gnome.org/archives/gtk-devel-list/2011-January/msg00049.html
2011-02-01 06:33:02 +01:00
Benjamin Otte
8ecd420ede x11: Do dnd event handling via gdk_window_add_filter() 2011-02-01 06:33:02 +01:00
Benjamin Otte
180cd853fc x11: Use macros for byte order to set byte order
No need to run sophisticated functions to guess it.
2011-02-01 06:33:02 +01:00
Benjamin Otte
609ddee632 x11: Register wm_protocols function with gdk_window_add_filter()
The client message code is about to go away, so we need to use a
different way to get at ClientMessage output.
2011-02-01 06:33:01 +01:00
Benjamin Otte
e67347a3c8 x11: Fill in event->any.window before calling filter functions
a) We advertise it for GdkFilterFunc
b) It's necessary to differentiate between different event types with
   multi-backend GTK.
2011-02-01 06:33:01 +01:00
Benjamin Otte
d217f4d09e x11: Handle motif client message filter just like xdnd filters 2011-02-01 06:33:01 +01:00
Benjamin Otte
14cb485d22 x11: Use event->any.window instead of any random member 2011-02-01 06:33:01 +01:00
Matthias Clasen
b52db73f59 Deal gracefully with unowned selections
If a selection looses its owner without a replacement, owner is
None, which we did not handle very well.

https://bugzilla.gnome.org/show_bug.cgi?id=641042
2011-01-31 19:35:51 -05:00
Kristian Rietveld
73afbc954a Check whether mask is NULL 2011-01-31 23:54:38 +01:00
Benjamin Otte
9864445b1f API: gdk: Change GdkEventOwnerChange to not take GdkNativeWindow
Use GdkWindow instead. This requires calling
gdk_x11_window_foreign_new_for_display(), so might cause a slight
performance penalty, but is required to be portable.
2011-01-31 07:17:31 +01:00
Matthias Clasen
61f8dbc245 Silence compiler warnings 2011-01-30 01:40:51 -05:00
Matthias Clasen
b1be543ba5 Use free() to free XIButtonState.mask
XIQueryPointer() allocates it using malloc() (without any mention
in the documentation...).
2011-01-29 23:27:36 -05:00
Matthias Clasen
d981b9ed61 Fix a doc typo 2011-01-28 11:10:07 -05:00
Benjamin Otte
ef1606604c x11: Use Window instead of GdkNativeWindow 2011-01-28 17:06:07 +01:00
Benjamin Otte
bd4ef49af9 API: x11: Add GDK_POINTER_TO_XID() and GDK_XID_TO_POINTER()
Previously people used GDK_GPOINTER_TO_NATIVE_WINDOW() for this, but
native windows are going away, so we need a replacement.
2011-01-28 17:06:07 +01:00
Carlos Garnacho
8fdd8dbc35 Do not modify associated device for non-master devices on dispose
Only master devices must modify the associated device to separate
a pointer/keyboard pair, slave devices must only call
_gdk_device_remove_slave().

Fixes bug 639767 - password not accepted in gnome-screensaver dialog,
reported by Frederic Crozat. On VT-switch, the X server removes its
grab on HW devices, the effect on clients is that slave devices
disappear, and these were mistakenly mangling the master device
hierarchy. so gdk_device_get_associated_device() on the client
pointer wouldn't return the paired keyboard anymore.

The final effect is that gtkplug-x11 wasn't setting a keyboard to
its generated events.
2011-01-24 19:55:41 +01:00
Carlos Garnacho
94c4a312c1 Add extra checks for GdkDevice functions that might fail on slave devices.
Documentation bits have been added as well.
2011-01-24 02:54:38 +01:00
Carlos Garnacho
5fd5872b37 Avoid toplevel tracking on slave device after ungrab
slave devices don't have coordinates themselves, as they depend
on a master, this only changes if they have a grab in effect,
so only keep toplevel tracking enabled in such situation. Fixes
Bug #640313 - BadDevice X error when ungrabbing a SLAVE device,
noticed by Jesse van den Kieboom.
2011-01-24 02:54:00 +01:00
Matthias Clasen
454c36523a Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 18:50:09 -05:00
Carlos Garnacho
0cc2f93d5c Free button_state.mask after XIQueryPointer()
This function allocates the button mask, so free it after
use, or right before the next XIQueryPointer() call, as done
in gdk_x11_device_xi2_window_at_position().
2011-01-23 23:19:30 +01:00
Carlos Garnacho
b2b73a349e Fix valgrind warning about uninitialized value
mods_state->effective is not being set in XIQueryPointer() currently, so
use base|latched|locked instead, effective is nothing else than a shorthand
for these ORs, and these 3 values are set correctly anytime.
2011-01-23 23:14:53 +01:00
Benjamin Otte
51290e0a57 gdk: When reffing the impl surface, ref it from the impl window
This was causing surfaces to be created with the wrong size and that
caused broken clipping.

https://bugzilla.gnome.org/show_bug.cgi?id=640195
2011-01-23 21:41:01 +01:00
Matthias Clasen
eab3d94a43 Expose gtk-auto-mnemonics as an Xsetting 2011-01-22 23:48:39 -05:00
Matthias Clasen
9d34a9cc65 checksettings: succeed quietly 2011-01-22 23:47:01 -05:00
Tomeu Vizoso
e2d42f3c4b [gi] Return value of gdk_window_new should have transfer full 2011-01-21 17:34:18 +01:00
Fridrich Štrba
a79f05c7be fix win32 build after removal of the colormap debug category 2011-01-21 11:20:16 +01:00
Sebastian Pölsterl
8effa1eb0e [gi] Added missing (allow-none) annotation to gdk_device_grab 2011-01-21 10:36:07 +01:00
Matthias Clasen
46903a9100 Fix a crash during DND
https://bugzilla.gnome.org/show_bug.cgi?id=640105
2011-01-20 21:36:50 -05:00
Benjamin Otte
ec750bed0c gdk: Remove colormap debug category
We don't have colormaps anymore.
2011-01-21 02:54:09 +01:00
Benjamin Otte
7013406167 x11: Don't keep two lists of devices internally 2011-01-21 02:54:09 +01:00
Johan Dahlin
7ad7c61678 Mark api with xlib types as skipped
Since they'd need to have boxed type to be able to work
for introspection based bindings
2011-01-20 12:12:22 -02:00
Johan Dahlin
1e0327f844 Use identifier-prefix instead of deprecated strip-prefix 2011-01-20 12:12:22 -02:00
Pavel Holejsovsky
374e76a19d [GI] Mark unintrospectable constructs as (skip)
Also adds 'Rename to:' annotation to some constructs replacing the
skipped ones.
2011-01-20 13:57:21 +01:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Pavel Holejsovsky
9b88eb356d [GI] Add missing (scope) annotations 2011-01-20 13:57:15 +01:00
Pavel Holejsovsky
3c8fc21e9b [GI] Fixes of existing incorrect annotations 2011-01-20 13:56:06 +01:00
Alexander Larsson
a3b227ff9e [broadway] Remove unused grab_count from GdkBroadwayDisplay
We don't need this anymore since server grabs is now an x-only feature
2011-01-20 13:40:41 +01:00
Alexander Larsson
cbc324d846 [broadway] Prefix internal functions with broadway 2011-01-20 13:40:34 +01:00
Alexander Larsson
2c0012b76b [broadway] Remove gdk_set_locale 2011-01-20 13:19:01 +01:00
Alexander Larsson
549610a8dd [broadway] Remove unused input window stuff 2011-01-20 13:18:15 +01:00
Alexander Larsson
60c2b80bf0 [broadway] Remove all leftover _gdk_windowing_ functions 2011-01-20 13:12:26 +01:00
Laszlo Pandy
75a05621bf [GI] Add annotation (type GdkModifierType) to state attributes in many GdkEvent structs.
The state attribute is available in GdkEventMotion, GdkEventButton,
GdkEventScroll, GdkEventKey and GdkEventCrossing. This type annotation
fixes the wrapping of this attribute in the GI PyGObject bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=639929
2011-01-20 11:19:26 +01:00
Pavel Holejsovsky
9389054da2 [GI] Add (type) annotations to real types 2011-01-20 10:38:38 +01:00
Matthias Clasen
99812be7d7 Be more careful with private event data
When copying allocated events, also copy the source device.
When synthesizing double or triple clicks, copy the original
button press event including device information.

https://bugzilla.gnome.org/show_bug.cgi?id=639822
2011-01-19 22:52:55 -05:00
Alexander Larsson
07db0e38b0 [broadway] Make broadway build with new gdk-backend setup
Convert all global functions to vtable calls, etc.
2011-01-19 19:52:51 +01:00
Alexander Larsson
920e8b4343 Merge branch 'master' into broadway2
Doesn't build, but fixed up actual conflicts

Conflicts:
	configure.ac
	gdk/Makefile.am
	gtk/Makefile.am
2011-01-19 19:52:00 +01:00
Pavel Holejsovsky
a1c297a310 [GI] Cosmetic cleanups of annotations and doc comments
This change does not introduce any functionality change, mostly
cosmtic cleanups, like re-linebreak when introduced annotations messed
up indentation or whitespace errors fixes.
2011-01-18 17:31:59 +01:00
Pavel Holejsovsky
729c823955 [GI] Mark callbacks' context parameter with (closure) annotation. 2011-01-18 17:20:32 +01:00
Matthias Clasen
bb7662392d Don't set the default display to NULL
This was causing segfaults if DISPLAY is unset
2011-01-18 09:36:59 -05:00
Matthias Clasen
fe687e760e Add testcases for opening display
More precisely, test that we can successfully fail to open
a display...
2011-01-18 09:36:24 -05:00
Tristan Van Berkom
d9ebdb7610 Plugged memory leak in gdk_x11_device_manager_xi2_list_devices.
This was simply a misplaced 'g_list_copy()'.
2011-01-16 22:47:12 +09:00
Matthias Clasen
e62b68fe62 Add EXPORT_PACKAGES for the girs
This connects the girs to the pc file names.

https://bugzilla.gnome.org/show_bug.cgi?id=635287
2011-01-14 09:46:21 -05:00
Matthias Clasen
9d14edf760 Add --include-uninstalled for the gdk gir
https://bugzilla.gnome.org/show_bug.cgi?id=635287
2011-01-14 09:44:10 -05:00
Matthias Clasen
8ba35bc381 Add --warn-all to introspection scanner args
https://bugzilla.gnome.org/show_bug.cgi?id=635287
2011-01-14 09:32:26 -05:00
Tristan Van Berkom
89eb869ecf Avoid crashes calling gdk_window_enable_synchronized_configure() on an offscreen window.
Just added gdk_offscreen_window_do_nothing() noop stub in that slot.
2011-01-13 17:03:14 +09:00
Chun-wei Fan
479a08054b Update MSVC 2008 Project Files
-Update the project files to simplify them a bit after the seperation of
 GDK-Pixbuf (move GDK-Pixbuf includes into the property sheet, move the
 linking of Cairo/Pango/PangoCairo into the property sheet)--this is for
 all DLL/EXE Projects (GDK/GTK/gtk-demo)

-Update the GDK-Win32 project as the source files have changed
 significantly (especially as GDK3 was not compilable on Windows for a
 while--thanks to Hans Breuer for the help in the process-Bug 639127)

-Made up for missed headers in the "install" stage and removed the removed
 headers in the property sheet

-Updated GTK+ .def file generation as an extra macro is needed for that

-Updated gdk/Makefile.am for the generation of gdk.vcproj from gdk.vcprojin
2011-01-12 18:32:57 +08:00
Fridrich Štrba
a606ea62a1 Fix win32 build 2011-01-11 17:28:37 +01:00
Benjamin Otte
7e33c009a0 gdk: Fix typo
<mclasen>: Comapny: kludge, with a k
2011-01-11 17:06:49 +01:00
Benjamin Otte
b05f54ff73 x11: Add --c-include for gdk/gdkx.h to Gdk-X11 gir build 2011-01-11 16:46:59 +01:00
Benjamin Otte
ebd5f8b10e gdk: Put stub gdkx.h into gdk/ dir
This is so we can include gdk/gdkx.h from inside GTK code.
2011-01-11 16:46:59 +01:00
Benjamin Otte
654aca5ccd gdk: Don't build X11 stuff into Gdk.gir 2011-01-11 16:46:59 +01:00
Benjamin Otte
268efbc0ef gdk: Add --c-include gdk/gdk.h to Gir build. 2011-01-11 16:46:59 +01:00
Hans Breuer
f605d3d698 Bug 639127 - Add missing gdkdisplaymanager-win32.c 2011-01-10 21:39:33 +01:00
Matthias Clasen
9f13312520 Fix file lists in the win32 backend 2011-01-05 09:58:46 -05:00
Matthias Clasen
5c1502479a Fix gdk/abicheck.sh temporarily
The best fix for now is to just hardcode the X11 backend again
2011-01-04 23:40:41 -05:00
Matthias Clasen
c97652aeb4 Decouple GdkWindowCache life-cycle from GdkX11DragContext
By making window caches refcounted. This fixes problems with leaking
drag contexts, as experienced in
https://bugzilla.gnome.org/show_bug.cgi?id=637691
and
https://bugzilla.gnome.org/show_bug.cgi?id=144324

Based on a patch by drago01@gmail.com
2011-01-04 19:30:04 -05:00
Emilio Pozuelo Monfort
a108b2b08b Fix build when builddir != srcdir 2011-01-04 23:21:36 +00:00
Emilio Pozuelo Monfort
cfc70ca71b Fix introspection build when builddir != srcdir
So gdk/gdk.h can find gdk/gdkconfig.h, which is in $builddir
because it's generated.
2011-01-04 23:21:35 +00:00
Matthias Clasen
83058bf2ca Use AM_V_GEN in a few more places
Based on a patch by Javier Jardón in

https://bugzilla.gnome.org/show_bug.cgi?id=621720
2011-01-03 20:33:36 -05:00
Julien Cristau
d211c8af6b gdk/x11: don't select RANDR events if the extension is missing
Prevents an Xlib warning on Xnest, or Xorg with xinerama, or other
non-RANDR-capable xserver.  Reintroduce a have_randr12 field in
GdkDisplayX11 to avoid having to call XRRQuery{Extension,Version} twice,
and don't select randr 1.2 events if that's false.

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

Signed-off-by: Julien Cristau <jcristau@debian.org>
2011-01-03 12:13:30 -05:00
Kristian Høgsberg
9c002cf2c1 Silence automake warnings
When commenting out a binary, also comment out the related variables.
Don't include Makefile.decl in gtk-doc Makefile.am's as they disagree
on assigning to EXTRA_DIST.
2011-01-03 11:59:45 -05:00
Kristian Høgsberg
cacee7e7a3 configure.ac: Support multiple GDK backends in one build 2011-01-03 11:59:45 -05:00
Benjamin Otte
ae7e5fc2d1 gdk: Simplify code
Move a previous vfunc into the only caller.
2011-01-03 17:44:24 +01:00
Benjamin Otte
6c39cade16 gdk: Get rid of GdkDisplayDeviceHooks
Move the only user to call the function directly and copy the called
function over.
2011-01-03 17:44:24 +01:00
Benjamin Otte
6e18276f52 gdk: Move get_device_state out of the display hooks
Previous callers now use _gdk_device_query_state() directly.
2011-01-03 17:44:24 +01:00
Benjamin Otte
2267602295 gdk: Simplify code
Fold the previous vfunc into the only caller.
2011-01-03 17:44:24 +01:00
Benjamin Otte
8d2104fdc9 gdk: Move window_get_device_position function out of the device hooks 2011-01-03 17:44:24 +01:00
Benjamin Otte
d72d19d247 API: gdk: Remove gdk_display_set_device_hooks()
There's no usecase for them, so remove them before we have to commit to
keeping an API.

Make the hooks private for now, actually removing them will come in
followup patches.
2011-01-03 16:51:38 +01:00
Benjamin Otte
ff1ad99dce API: gdk: Remove gdk_display_set_pointer_hooks()
Its usecase was GERD - http://testbit.eu/~timj/historic/gerd/ - and that
project is long since dead.

I couldn't find any app using it after asking around and googling either.
2011-01-03 16:35:10 +01:00
Benjamin Otte
36a15720b1 API: gdk: Remove gdk_set_pointer_hooks()
Its usecase was GERD - http://testbit.eu/~timj/historic/gerd/ - and that
project is long since dead.

It has been superseded in GTK 2.2 by GdkDisplayPointerHooks anyway.
2011-01-03 16:25:18 +01:00
Nguyễn Thái Ngọc Duy
cf752786f3 gdkdnd-x11.c: fix building without HAVE_XCOMPOSITE
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2011-01-02 23:40:00 -05:00
Nguyễn Thái Ngọc Duy
98a30bbf3e gdkcursor-x11.c: fix building without HAVE_XCURSOR
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2011-01-02 23:39:55 -05:00