Commit Graph

5183 Commits

Author SHA1 Message Date
Owen W. Taylor
69f457426a Switch to an extended form of _NET_WM_SYNC_REQUEST_COUNTER
By exporting two XSync counters on a toplevel window, we subscribe
to an extended form of the _NET_WM_SYNC_REQUEST_COUNTER protocol,
where the window manager can initiate an atomic frame, as previously,
but the application can also do so by incrementing the new counter to
an odd value, and then to an even value to finish the frame.

See:
https://mail.gnome.org/archives/wm-spec-list/2011-October/msg00006.html

The support for 64-bit integers that GLib requires is used to
simplify the logic.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
1824796bfb GdkFrameClock: add freeze/thaw
Add the ability to freeze a frame clock, which pauses its operation,
then thaw it again later to resume.

Initially this is used to implement freezing updates when we are
waiting for ConfigureNotify in response to changing the size of
a toplevel.

We need a per-window clock for this to work properly, so add that
for the X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
c4545cc5d4 GdkFrameClock: Make the phase explicit when requesting the frame
Instead of having gdk_frame_clock_request_frame() have
gdk_frame_clock_request_phase() where we can say what phase we need.
This allows us to know if we get a frame-request during layout whether
it's just a request for drawing from the layout, or whether another
layout phase is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
7753883add Use GdkFrameClock for relayout
Add a ::layout signal to GdkFrameClock and use it instead of an idle
handler to drive the restyling and relayout of containers.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Owen W. Taylor
77bac0d6ae Add GdkFrameClock
Add an object GdkFrameClock that we associate with a GdkWindow.
This tracks when the window needs to be repainted, and will also
be used for other operations in the future like relayout and
updating animations.

Based on a patch from Havoc Pennington:

 https://mail.gnome.org/archives/gtk-devel-list/2010-October/msg00004.html

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Owen W. Taylor
001f960a43 GdkDisplayX11: Don't use substructure events in internal accounting
We may receive events because SubstructureNotifyMask has been selected
for the root window. (Most likely, this would occur because GTK+
is being used inside a window manager like Metacity or Mutter.)
This can confuse various types of internal accounting, so detect
such events and comprehensively ignore them for GDK's internal
purposes. We still need to generate GDK events for these cases
because you can select for substructure events with
GDK_SUBSTRUCTURE_MASK.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Rob Bradford
4e1d999940 wayland: Add support for output device removal
Since we only receive an object id for the removed object we must try and
remove that from the list of devices based on that id.
2013-02-14 13:28:07 +00:00
Rob Bradford
fab808f92c wayland: Add basic multiple output support
Store the wl_output pointer within the the GdkWaylandMonitor structure.
2013-02-14 13:02:27 +00:00
Cosimo Cecchi
c896adc9e9 settings: add a gtk-recent-files-enabled GtkSetting
Backed by an XSetting, so g-s-d can set it according to the GSettings
value.

https://bugzilla.gnome.org/show_bug.cgi?id=693724
2013-02-13 12:06:43 -05:00
Jan Arne Petersen
ff2a387154 wayland: Handle wl_output in GdkWaylandScreen
Expose information about outputs in GdkScreen (gdk_screen_get_n_monitors
and gdk_screen_get_monitor_*).
2013-02-13 15:52:05 +00:00
Thomas Wood
bfd7137ffb wayland: skip pointer and keyboard events without a surface
Pointer and keyboard events can be received after the surface has been
destroyed, in which case the surface will be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=693338
2013-02-12 15:30:56 +00:00
Thomas Wood
8568d66a73 gdkwindow: don't use last_slave for the source device if it is NULL
Some backends do not have slave devices, which means last_slave may be
NULL. Use the current device as the source device if last_slave is NULL
when synthesizing a crossing event.

https://bugzilla.gnome.org/show_bug.cgi?id=692411
2013-02-12 15:30:56 +00:00
Thomas Wood
a8862727c9 wayland: set the "transient inactive" flag on tooltip surfaces
This prevents the tooltip surfaces from taking the focus away from the
parent surface.

https://bugzilla.gnome.org/show_bug.cgi?id=693313
2013-02-12 15:30:56 +00:00
Alexander Larsson
4d3c77f920 gdkwindow: Allow gdk_window_set_opacity on non-native children
We now store the current opacity for all windows. For native windows
we just call into the native implementation whenever the opacity changes.
However, for non-native windows we implement opacity by pushing a
second implicit paint that "stacks" on the existing one, acting as
an opacity group while rendering the window and its children.

This works well in general, although any native child windows will of
course not be opaque. However, there is no way to implement
implicit paint flushing (i.e. draw the currently drawn double buffer
to the window in order to allow direct drawing to the window).
We can't flush in the stacked implicit paint case because there
is no way to get the right drawing behaviour when drawing directly
to the window. We *must* draw to the opacity group to get the right
behaviour.

We currently flush if:
* A widget disables double buffering
* You call move/resize/scroll a window and it has non-native children
  during the expose handler

In case this happens we warn and flush the outermost group, so there may
be drawing errors.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Alexander Larsson
ada6d81247 gdkwindow: Store the implicit paint in a list
This changes nothing, but lets us later have multiple
implicit paints

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Rob Bradford
f6383ebf9e wayland: React to G_IO_ERR and G_IO_HUP on the wayland socket
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692728
2013-02-06 18:08:58 +00:00
Thomas Wood
2935b97b31 wayland: remove debug message
https://bugzilla.gnome.org/show_bug.cgi?id=693253
2013-02-06 16:56:44 +00:00
Thomas Wood
6657479c72 wayland: avoid returning NULL when getting a cursor
https://bugzilla.gnome.org/show_bug.cgi?id=693257
2013-02-06 16:56:44 +00:00
Thomas Wood
4f6d535626 wayland: use the GdkCursorType enum information to lookup the cursor name
Use the enum information to generate the cursor name rather than using a
lookup table.

https://bugzilla.gnome.org/show_bug.cgi?id=693256
2013-02-06 16:56:44 +00:00
Thomas Wood
69ac91b4b3 wayland: fix the direction of scrolling
Fix the direction of scrolling and convert the delta values into the
expected range.

https://bugzilla.gnome.org/show_bug.cgi?id=693251
2013-02-06 16:56:43 +00:00
Rob Bradford
03d405e484 gdkwindow: Do not rely on a previous slave device when updating grab
_gdk_display_device_grab_update does not support passing in NULL for the
source device. If we don't have a slave device (saved in the pointer info)
then do not try and use that NULL pointer for the source_device.

This bug appeared in the Wayland backend where we (currently) only have master
devices exposed and as such no slave device is ever saved.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692411
2013-02-06 14:17:46 +00:00
Rob Bradford
b43d36d43d wayland: Use g_value_set_static to avoid string copies 2013-02-05 18:28:43 +00:00
Rob Bradford
93c3fec125 wayland: Pull the cursor theme name out from the setting for it
This avoids us using the default theme and allows us to use a wider range of
cursors.
2013-02-05 13:25:20 +00:00
Rob Bradford
69e9ecf90a wayland: Advertise the cursor theme through GtkSettings as Adwaita
... as per the way we advertise a GTK theme to use.
2013-02-05 13:25:20 +00:00
Jan Arne Petersen
e335a3fd31 wayland: Add global_remove handler
Do not crash on wl_registry.global_remove events anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=692899
2013-02-01 23:04:16 -05:00
Jan Arne Petersen
e437016a65 wayland: Make GdkWaylandDevice public
Rename GdkDeviceCore to GdkWaylandDevice and export it properly in a
header file. Add public accessors for wl_seat, wl_pointer and
wl_keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:17 -05:00
Jan Arne Petersen
363eea659c wayland: Rename GdkWaylandDevice
Rename GdkWaylandDevice to GdkWaylandDeviceData so that GdkDeviceCore
can be renamed to GdkWaylandDevice.

https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:15 -05:00
Jan Arne Petersen
ac3a50bfe6 wayland: Remove unused, commented out code
https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:12 -05:00
Matthias Clasen
09dc62050f Add new fullscreen symbols 2013-02-01 22:54:19 -05:00
Rob Bradford
a687cbaae8 wayland: Implement gdk_window_fullscreen & gdk_window_unfullscreen 2013-01-29 18:42:44 +00:00
Jasper St. Pierre
002ac992d1 gdkdevicemanager-x11: Request XI2.3
Since XIQueryVersion, the bad API that it is, enforces the version from
the first client that requests it, for clients to be able to use the new
features in XI2.3, we need to ensure that we pass XIQueryVersion 2.3 as
the version that we support. We know that GTK+ won't be confused by the
new features.

https://bugzilla.gnome.org/show_bug.cgi?id=692467
2013-01-28 12:53:39 -05:00
Jasper St. Pierre
e340049eb8 gdkdevicemanager-x11: Always request XI2.2
The X server should fill in the minor version that it supports in the
case where it only supports the older version, so we can safely always
pass a higher version number than is potentially supported by the
server.

libXi was designed to be stable in the case where it doesn't recognize
requests or events/replies, so this should still work in a case where
we have new versions of the X server, and GTK+, but an old version of
libXi, at least for however well that setup should work.

https://bugzilla.gnome.org/show_bug.cgi?id=692467
2013-01-28 12:45:01 -05:00
Rico Tzschichholz
22bad6a240 wayland: Add missing reference to gdkwaylandwindow.h
Missing bit of 01c0dd9182
2013-01-27 16:32:44 +01:00
John Lindgren
ce6b77c25b XSettingsList is now a typedef for GHashTable.
https://bugzilla.gnome.org/show_bug.cgi?id=692605
2013-01-27 01:08:25 +01:00
John Lindgren
885b43dd3a Use hash-based conversions for XSETTINGS names.
https://bugzilla.gnome.org/show_bug.cgi?id=692605
2013-01-27 01:08:25 +01:00
Olivier Fourdan
dac6a76ef2 x11: implement gdk_window_apply_fullscreen_mode()
for the X11 backend using the EWMH mechanism
_NET_WM_FULLSCREEN_MONITORS.

https://bugzilla.gnome.org/show_bug.cgi?id=691856
2013-01-25 13:16:57 +01:00
Olivier Fourdan
54dc823d67 gdk: add gdk_window_set_fullscreen_mode()
and gdk_window_get_fullscreen_mode() API to allow
applications to specify if a fullscreen window should
span across all monitors in a multi-monitor setup or
remain on the current monitor where the window is
placed.

Fullscreen mode can be either GDK_FULLSCREEN_ON_ALL_MONITORS
or GDK_FULLSCREEN_ON_CURRENT_MONITOR.

https://bugzilla.gnome.org/show_bug.cgi?id=691856
2013-01-25 13:16:56 +01:00
Jan Arne Petersen
01c0dd9182 wayland: Make GdkWaylandWindow public
Allows to access Wayland specific window information like wl_surface and
wl_shell_surface.

Add gdk_wayland_window_get_wl_surface for getting the Wayland wl_surface
and gdk_wayland_window_get_wl_shell_surface for getting the Wayland
wl_shell_surface.
2013-01-23 22:26:27 +01:00
Jan Arne Petersen
2b9f0b4817 wayland: Make GdkWaylandDisplay public
Allows to access Wayland specific display information like wl_display
etc.

Add gdk_wayland_display_get_wl_display for getting the Wayland
wl_display.
2013-01-23 22:26:27 +01:00
Rob Bradford
2d676f32b1 wayland: Handle the keymap being needed before we know about seats
In the Wayland backend implementation for gdk_display_get_keymap we enumerate
the known devices and look for an core keyboard device. These device objects
are created when we receive the capabilities for the seat. The seat
capabilities may be received after a request for the keymap so we handle this
by creating a temporary keymap which we then free later when we have the real
one.
2013-01-22 19:12:29 +00:00
Bastien Nocera
ed3eaf6e50 gdk: Fix typo in gdkkeysyms-update.pl
s/Authos/Author
2013-01-18 17:26:28 +01:00
Rob Bradford
d4a9863e19 wayland: Drop code to use cairo-gl for rendering
The APIs that this code relied upon were removed in Wayland 1.0 and as such
this code has been broken since then.
2013-01-18 08:56:47 +00:00
Kristian Rietveld
1d410ec960 quartz: retain content view when switching over toplevel.
(cherry picked from commit 184407309f)
2013-01-17 14:45:33 +01:00
Kristian Rietveld
ce7d29aa89 quartz: Make sure the old toplevel is closed on recreation
(cherry picked from commit 30deba453a)
2013-01-17 14:45:07 +01:00
Kristian Rietveld
b4b42ba54d quartz: make sure all old properties are set on the new toplevel
Apply patch by Paul Davies; part of bug 669808.
(cherry picked from commit a8008b796f)
2013-01-17 14:43:15 +01:00
Kristian Rietveld
5162751f6c quartz: ensure window being (un)fullscreened is visible
Patch by Paul Davis; part of bug 669808.
(cherry picked from commit 62f1d871b7)
2013-01-17 14:40:30 +01:00
Carlos Garnacho
3210cd6511 gdk: strengthen touch crossing event synthesizing on programmatical crossings
There are cases where crossing events aren't generated by input devices themselves
but rather through programmatical means (windows being moved/hidden/destroyed while
the pointer is on top).

Those events come from X as sourceid=deviceid, and GDK does its deal at lessening
this by setting a meaningful source device on such events, although this caused
some confusion on the mechanism to block/synthesize touch crossing events that
could possibly cause bogus enter events on the new window below the pointer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691572
2013-01-15 17:48:56 +01:00
Benjamin Otte
1205e3b043 x11: unconst-cast result of g_get_prgname()
X doesn't like const...
2013-01-13 23:47:39 +01:00
Geoff Reedy
2fcbe3a9b4 x11: add missing checks that a hint is supported
Before acting on any hint that is set by the window manager we must
first check that the hint is supported by the current window manager.
Checking that a property has a value is insufficient as it may have
been set by a previous window manager which did support the hint.

https://bugzilla.gnome.org/show_bug.cgi?id=691515
2013-01-12 18:38:37 -05:00
Alexander Larsson
ada20f475d broadway: Make /dev/shm names nicer 2013-01-10 23:59:23 +01:00
Alexander Larsson
da8ff82df5 broadway: Make Sec-WebSocket-Origin optional
Sometimes we get no Origin in the request
2013-01-10 22:50:03 +01:00
Alexander Larsson
2e76e5a543 broadway: Allow binding http server to an ip 2013-01-10 21:38:39 +01:00
Alexander Larsson
befde1f7de broadway: Remove leftover typedef 2013-01-10 16:00:43 +01:00
Alexander Larsson
5708e2bc2c broadway: Update TODO 2013-01-08 18:05:06 +01:00
Alexander Larsson
d5812de2e6 broadway: Send window size to new clients
Tell all new clients about the current (last sent) window size.
2013-01-08 18:05:06 +01:00
Alexander Larsson
35c295da89 broadway: Don't allow dragging windows above top of window
This is highly confusing and makes it impossible to get the windows
back.
2013-01-08 18:05:06 +01:00
Alexander Larsson
8e686357c4 broadway: Move window position ownership to browser
With this we always roundtrip position change to the webbrowser.
This avoids conflicts when things change from both directions (app and user).

Also, we fake configure evens when there is no web client to ensure
apps get the events.
2013-01-08 18:05:06 +01:00
Alexander Larsson
4d7b822059 broadway: Make the InputMessage type a uint32
That way we don't get any holes in the structs.
2013-01-08 18:05:06 +01:00
Alexander Larsson
f72d1a8d2b broadway: Fix gdk_broadway_server_wait_for_reply
We didn't properly queue an idle to handle the read messages so they
were never serviced in some situations.
2013-01-08 18:05:06 +01:00
Alexander Larsson
6f910e5e02 broadway: Clean up broadwayd event sending code
Use the right size and put the client serial in the right place.
2013-01-08 18:05:06 +01:00
Alexander Larsson
c83d35d1df broadway: Rewrite serials for clients
This seems right, but atm it breaks grabs.
2013-01-08 18:05:06 +01:00
Alexander Larsson
71e7912940 broadway: Remove last_serial from BroadwayReplyBase
This is not used anyway.
2013-01-08 18:05:05 +01:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Alexander Larsson
ec45d2f8c7 broadway: Handle NULL surface in update
This happen if nothing has been drawn yet.
2012-12-27 22:56:04 +01:00
Alexander Larsson
e00bc73de8 broadway: Rename gdkbroadway-server-client.c to gdkbroadway-server.c 2012-12-27 22:56:04 +01:00
Alexander Larsson
6410a43b76 broadway: Make resize grip work again 2012-12-27 22:56:04 +01:00
Alexander Larsson
aac4a027eb broadway: Stop default mouse button handling
This makes it not possible to select the canvas objects, etc.
2012-12-27 22:56:04 +01:00
Alexander Larsson
9555478b9e broadway: Add TODO.broadway 2012-12-27 22:56:04 +01:00
Alexander Larsson
f84df03513 broadway: Move broadwayd to bin 2012-12-27 22:56:04 +01:00
Alexander Larsson
63b6c07fe0 broadway: During pointer grabs, send pointer events only to one client 2012-12-27 22:56:04 +01:00
Alexander Larsson
75ee72f2ac broadway: Make daemon side server "gdk independent". 2012-12-27 22:56:04 +01:00
Alexander Larsson
3558e655b4 broadway: Proper handling of http port and display nr 2012-12-27 22:56:04 +01:00
Alexander Larsson
59830a9001 broadway: Collect and document some TODOs 2012-12-27 22:56:04 +01:00
Alexander Larsson
329372a343 broadway: Track windows for client and kill on client exit 2012-12-27 22:56:04 +01:00
Alexander Larsson
5ee8b69418 broadway: Rename gdkbroadway-server.c to broadway-server.c
This way the broadway-*.c namespace is for the daemon and gdk* for the
gdk lib.
2012-12-27 22:56:03 +01:00
Alexander Larsson
8b9ccf4ee9 broadway: rename broadway-server to broadwayd
The "server" part is too confusing, there are to many servers around.
2012-12-27 22:56:03 +01:00
Alexander Larsson
e801d06229 broadway: Drop libbroadway.la
This is not needed anymore, its just used by the server.
2012-12-27 22:56:03 +01:00
Alexander Larsson
20b79b06ee broadway: rename broadway.[ch] to broadway-output.[ch] 2012-12-27 22:56:03 +01:00
Alexander Larsson
3005f1b844 broadway: disconnect in idle when needed
This makes the ownership cleaner
2012-12-27 22:56:03 +01:00
Alexander Larsson
fc96ef51d7 broadway: Initial version of separate broadway server
This kinda works but is very rudimentary
2012-12-27 22:56:03 +01:00
Alexander Larsson
4addb2108e broadway: Add OPs top protocol 2012-12-27 22:56:03 +01:00
Alexander Larsson
9aa36d8d0d broadway: Add enum for even types 2012-12-27 22:56:03 +01:00
Alexander Larsson
95a0c055da broadway: Break out broadway protocol in its own header 2012-12-27 22:56:03 +01:00
Alexander Larsson
dfbabfbd6d broadway: Use SOURCE operator when scrolling 2012-12-20 00:00:16 +01:00
Alexander Larsson
9e65be6c48 broadway: Allow reconnecting to a broadway page 2012-12-20 00:00:16 +01:00
Alexander Larsson
54714cb228 broadway: Fix possible access-after-free
We need to calculate the buf pointer after the realloc.
2012-12-20 00:00:16 +01:00
Alexander Larsson
9c3cd49abd broadway: Remove separate browser windows hack
This never really worked well, we need to be able to fully handle
sizes from the client.
2012-12-20 00:00:16 +01:00
Alexander Larsson
0a808bea54 broadway: Separate out the server parts
This (shouldn't) change any behaviour, but it moves the
webserver parts to a separate file, making the broadway display file
smaller and preparing for later separating out the server to its own
process.
2012-12-20 00:00:16 +01:00
Benjamin Otte
4cfd1f51c0 gdk: API: constify argument
gdk_window_set_background_rgba() should take a const RGBA.
2012-12-17 17:21:07 +01:00
Jasper St. Pierre
9dc4c5ce73 xi2: Abort early if we don't have a proper GDK window
This can happen in mutter or other applications that use GDK filters
but don't actually create GDK windows for everything they get events
for.

https://bugzilla.gnome.org/show_bug.cgi?id=689401
2012-12-13 10:51:38 -05:00
Aleksander Morgado
a61b359498 GdkBroadwayDisplay: include proper port number in error trace 2012-12-05 11:23:35 +01:00
Aleksander Morgado
4dabc8ba84 GdkBroadwayDisplay: initialize GError before using it 2012-12-05 11:23:28 +01:00
Matthias Clasen
256f168525 Obtain the recent files max age setting from xsettings
This will help with implementing desktop-wide policy for
retaining of history.

https://bugzilla.gnome.org/show_bug.cgi?id=689047
2012-11-29 23:10:33 -05:00
Alan McGovern
149de71624 Fix broken function pointer declarations on windows
Both flashing a window and setting the window opacity were using
incorrect declarations for function pointers. They were missing the
WINAPI annotation as defined in windows.h. As a result, the stack
could be corrupted when these functions were invoked.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=689235
(cherry picked from commit 5637ef1f97)
2012-11-29 15:07:42 +01:00
Michael Natterer
709f12b9ac quartz: add mountain lion as version 8 to enum GdkOSXVersion
Also use GDK_OSX_UNSUPPORTED instead of 0 in gdk_quartz_osx_version().
(cherry picked from commit 9644e910a8)
2012-11-29 15:00:57 +01:00
Michael Natterer
e2144fbb7e quartz: call Gestalt() only once per session in gdk_quartz_osx_version()
Thanks to Paul Davis for pointing this out.
(cherry picked from commit d6533ffc44)
2012-11-29 15:00:38 +01:00
Camillo Lugaresi
4f6e1fdf16 Bug 688710 - splashscreen shouldn't be always on top on OS X
Activate the "hides on deactivate" behavior for splashscreens,
torn-off menus, utility windows, tooltips and notifications: when
another application is brought to the front, these windows are hidden
so as not to obscure it. This is the expected behavior for
application-specific floating windows on OS X.
(cherry picked from commit 0596f5591f)
2012-11-20 22:03:40 +01:00
Michael Natterer
d0af25f12c quartz: fix the mapping of GDK_KP_Enter in known_numeric_keys[]
so it will actually be used, instead of delivering GDK_Return
when it should be GDK_KP_Enter.
(cherry picked from commit 27f3fcf12c)
2012-11-20 19:14:43 +01:00
Michael Natterer
455a0ecc1c quartz: always send GDK_NOTIFY_NONLINEAR crossing events
so GtkMenu works properly. This is not right, but not more
wrong than always sending GDK_NOTIFY_ANCESTOR either.
(cherry picked from commit 35a9322e45)
2012-11-20 10:35:40 +01:00
Michael Natterer
2d5ad5f54e Bug 672193 - windows (including menus) shown multiple times don't...
Based on a patch from Paul Davis, inject synthetic enter events directly
into the Quartz event stream, instead of trying to synthesize them in GDK.

This seems to magically fix most combo box popup weirdness, I guess
some code is relying on a specfic order of events, or any other state
imposed by the "proper" code path of events coming in the usual way.

The patch also removes _gdk_quartz_events_send_enter_notify_event()
which is now obsolete.

(sortof cherry-pixked from 979e5061a0
but needed manual editing because GdkQuartzWindow.c was renamed
and apparently earlier patches not picked correctly/completely)
2012-11-20 10:28:58 +01:00
Michael Natterer
b55724e3a7 quartz: use the real current event time for generated motion events
(cherry picked from commit b4a30877a9)
2012-11-18 20:17:22 +01:00
Michael Natterer
f2e05e2b41 quartz: move tooltips window to the topmost level
so they can appear on top of popup menus. Also, reorder the switch()
statement in window_type_hint_to_level() so it resembles the stacking
order, to avoid confision like this in the future. Fixes bug 688512.
(cherry picked from commit 1a2509a6ab)
2012-11-18 17:47:33 +01:00
Michael Natterer
18fdc975be quartz: GdkQuartzWindow -> GdkQuartzNSWindow was forgotten in one place 2012-11-15 13:17:31 +01:00
Michael Natterer
ed5d7fed89 quartz: filter out button press events on the window frame
Don't try to handle button press events on the window frame, they
have out-of-window coordinates. Also, break grabs on such events
so popup menus go away.
Patch from Kristian Rietveld, fixes bug 684419.
(cherry picked from commit 43e1354b71)
2012-11-15 12:35:58 +01:00
Michael Natterer
aa989a637a quartz: move SPLASHSCREEN-hinted windows to NSStatusWindowLevel
which does not really have a different effect than the previously
used NSPopUpMenuWindowLevel, but is what all code examples I found
are using, and it does make more sense.
(cherry picked from commit 47f0e3f1e1)
2012-11-13 20:05:33 +01:00
Alexander Larsson
8a40d8fe2a gdk: Add gdk_window_has_alpha helper
This centralizes the current checks for has_alpha_bg, which
lets us extend the check later.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2012-11-09 10:08:22 +01:00
Matthias Clasen
9ebeb4e68a Bump GLib dependency to 2.35
And drop deprecated g_type_init() calls.
2012-11-04 13:01:38 -05:00
Ran Benita
21cf5a7e00 wayland: update to work with stable libxkbcommon
libxkbcommon has had some changes to its API. However, it now has a
stable release (0.2.0), so this makes the necessary changes, and
replaces all uses of the deprecated API.

Signed-off-by: Ran Benita <ran234@gmail.com>
2012-10-29 15:45:31 +00:00
John Ralls
41f29032d2 Fix typo from f2ab3af 2012-10-25 10:58:56 -07:00
Matthias Clasen
5aff66f391 Add GDK_VERSION_3_8
This macro is needed for the new AVAILABLE_IN and DEPRECATED_IN
macros.
2012-10-23 17:36:17 -04:00
Jean Parpaillon
247bc3ad69 Fix out of source tree building for gdk/broadway
This patch fix compilation when building out of source tree (gdk/broadway dir).

Signed-off-by: Colin Walters <walters@verbum.org>
2012-10-22 11:30:37 -04:00
Scott Moreau
e5b88f1bdd wayland: Update to reflect protocol changes 2012-10-19 12:21:35 +01:00
Stefano Facchini
0f36b16733 Add gdk version macros for 3.8
https://bugzilla.gnome.org/show_bug.cgi?id=684288
2012-10-17 14:12:57 +02:00
Kristian Rietveld
c7ce4b6b3d quartz: Actually use the window background PATTERN color
Before we used a window's background color, which resulted in corrupted
display in some cases, presumably because we didn't reset the active
pattern. This patch seems to eliminate the observed corruption.
(cherry picked from commit 0e42cf81f1)
2012-10-09 16:19:29 +02:00
Cosimo Cecchi
e09cf6978e gdk: only emit display-opened after the default display has been set
This avoids a case where the display has been opened, but calling
gdk_display_get_default() in the callback doesn't work.

Reviewed-by: Benjamin Otte <otte@redhat.com>
2012-10-08 18:44:09 -04:00
Benjamin Otte
f9ddfa28b8 x11: Put function in header, don't declare them extern 2012-10-06 15:55:30 -04:00
Benjamin Otte
dd3c56d783 gdk: Ignore headers for declared functions 2012-10-06 15:55:30 -04:00
Alexander Larsson
83c66c9c2c Make process_all_updates draw synchronously
By calling XSync in _gdk_x11_display_after_process_all_updates we
effectively make gdk rendering sync, which avoids problems with the
client animations running faster than the Xserver rendering, thus
filling up the X rendering pipes and essentially "locking up" the
Xserver (i.e. you can't even close the offending window because the
WM is starved too).

I verified this worked by making GtkSpinner paint multiple times on my
intel driver (which has some issue making this rendering slow atm),
and without this patch i get severe lag where even window dragging
stops for 5 seconds when i drag the mouse around. However, with the
patch everything is smooth.

https://bugzilla.gnome.org/show_bug.cgi?id=684639
2012-10-02 13:12:49 +02:00
Alexander Larsson
db374a0a87 broadway: Use binary websockets if available 2012-10-01 14:58:57 +02:00
Alexander Larsson
86bcd1c22c broadway: Output message data directly to buffer
This cleans up the code, as well as allows later format
changes for e.g. binary websockets
2012-10-01 14:58:57 +02:00
Alexander Larsson
17aea12417 broadway: Encode urls directly into message buffer
No need for a temporary buffer
2012-10-01 14:58:56 +02:00
Alexander Larsson
95d9b17f35 broadway: Restructure output
Now we queue all output commands in a single buffer, to
ensure we send everything in a single op even for v7plus.
2012-10-01 14:58:56 +02:00
Alexander Larsson
203dd8bf7a broadway: Fix indentation 2012-10-01 14:58:56 +02:00
Alexander Larsson
96e7ff73dd broadway: Detect binary websockets support 2012-10-01 14:58:56 +02:00
Alexander Larsson
7c87684629 broadway: Centralize cmd parsing
This clean up things, as well as prepares for new message formats
such as binary websockets.
2012-10-01 14:58:56 +02:00
Benjamin Otte
8f96966178 window: Fail if the parent window and the visual don't match
They must be on the same screen.
2012-09-28 18:27:49 +02:00
Kristian Rietveld
4ccf8609ab quartz: Fix garbage content when windows are initially mapped
The garbage would be visible if any widget enabled the toplevel
NSView's CALayer in order to do custom native rendering.
(cherry picked from commit 92ea94af5f)
2012-09-28 10:11:16 +02:00
Matthias Clasen
5f9b010b94 Fix gdk docs build
This took far too long: The actual problem turned out to
be an unclosed <SECTION> in gdk3-sections.txt.
2012-09-18 13:54:22 -04:00
Matthias Clasen
e95490c15e GdkWindow: remove reference to a long-removed example 2012-09-18 13:54:22 -04:00
Michael Natterer
1ad25dfb81 quartz: Bug 674108 - Hard crash due to wrong NSAutoreleasePool stacking
Apply patch from Kristian Rietveld which addresses two issues
in gdkeventloop-quartz.c:

This patch moves the autorelease pool drain and introduces protection against
the invalidated ufds. Basically, when we suspect ufds has been invalidated by a
recursive main loop instance, we refrain from calling the collect function.
(cherry picked from commit 79b3326eaa)
2012-09-14 15:22:18 +02:00
Kristian Rietveld
64324a5da0 Implement gtk-primary-button-warps-slider GtkSetting
Make GtkRange honor the setting and implement it in the
quartz backend, it proxies the "click in the scroll bar to"
property from the OS X PrefPane.
2012-09-11 11:19:09 +02:00
Bastien Nocera
42f953eead gdk: s/availible/available/ 2012-09-10 17:39:27 +01:00
Daiki Ueno
7937b5d9f1 gdk: fix GI annotation and document for {map,add}_virtual_modifiers
https://bugzilla.gnome.org/show_bug.cgi?id=677559
2012-09-10 15:03:25 +02:00
Matthias Clasen
eb9223c008 Be more strict in ignoring ineffective modifiers
After my recent fix for this, nautilus was still having problems
telling keeping F10 and Shift-F10 apart. With this change, we are
treating levels with the same symbol like inactive levels, ignoring
them entirely.
2012-09-09 18:28:48 -04:00
John Ralls
f2ab3af20a Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion 2012-09-03 16:56:46 -07:00
Matthias Clasen
314b6abbe8 Try harder to discriminate Shift-F10 and F10
A change in xkeyboard-config 2.4.1 made it so that function keys
now have a shift level which has the same symbol, but 'eats' the
shift modifier. This would ordinarily make it impossible for us
to discriminate between these key combinations.

This commit tries harder to discriminate in 2 ways:
- XKB has a mechanism to tell us when a modifier should not be
  consumed even though it was used in determining the level.
  We now respect such 'preserved' modifiers. This does not fix
  the Shift-F10 vs F10 problem yet, since xkeyboard-config does
  not currently mark Shift as preserved for function keys.
- Don't consume modifiers that do not change the symbol. For
  the function keys, the symbol on the shift level is the same
  as the base level, so we don't consider Shift consumed.

For more background on the xkeyboard-config change, see
https://bugs.freedesktop.org/show_bug.cgi?id=45008

https://bugzilla.gnome.org/show_bug.cgi?id=661973
2012-09-01 23:25:18 -04:00
Alexander Larsson
29a42085c6 Remove gdk_window_flush_if_exposing as its not needed anymore
We no longer support modifying GdkWindow hierarchies during
expose events. This is not working anymore anyway as the
flush operation now does not push already rendered pixels
in the flushed window from the double buffer to the window.

https://bugzilla.gnome.org/show_bug.cgi?id=679144
2012-08-23 16:31:31 +02:00
Alexander Larsson
e112cdacd4 Fix flashing in non-double-buffered widgets
Avoid copying back partially drawn double-buffer data
when flushing to avoid flicker. This means non double
buffered widgets must draw opaque pixels in its expose
handlers, and that you are not allowed to use direct
rendering (or modify GdkWindow pos/size/order) from
inside the expose handler of a double buffered widget.

See https://bugzilla.gnome.org/show_bug.cgi?id=679144 for more
details
2012-08-23 16:31:30 +02:00
Alexander Larsson
820b0cafe0 gdkwindow.c: Fix up window debug code
Make this build and fully print clip regions.
2012-08-23 12:16:43 +02:00
Alexander Larsson
04811d9483 Avoid unnecessary window flushes
The code was calling _gdk_window_ref_cairo_surface in a few places
where the intent was not to read/write to the surface, but just look
at its type (to e.g. create a similar surface). This is bad, as that
operation causes a flush which may cause unnecessary work and/or
flashing. Instead we just get the impl surface in these cases.
2012-08-23 12:16:43 +02:00
Michael Natterer
78506bd604 quartz: add evil casting to make sure time wraps correctly on 32bit machines
get_time_from_ns_event(): apply patch from Michael Hutchinson which
makes sure the returned guint32 wraps correctly on 32 bit machines
when the uptime exceeds 2^32 ms.
2012-08-23 09:31:12 +02:00
John Ralls
2cb739a2d5 Implement gdk_quartz_keymap_lookup_key 2012-08-22 14:39:11 -07:00
Matthias Clasen
6fe0fbd4e2 Leave GDK_THREADS_ENTER/LEAVE visible for now
Not defining these macros at all causes harsh build breakages.
Better to leave them defined (but documented as deprecated) for now.
Everybody will still get the deprecation warnings for the underlying
gdk_threads_enter/leave.

We can hide the macros again later on when the world has had some
time to port off GDK threads.
2012-08-06 08:34:46 -04:00
Matthias Clasen
8f55b2775a Expand the thread deprecation documentation
The story is slightly different for applications vs libraries;
make it clear that libraries should continue using the lock so
we don't break applications that haven't been ported to the
'single thread' model yet.
2012-08-01 10:26:17 +02:00
Matthias Clasen
b936666b52 Improve threading documentation
This commit just adds a small section to the threading documentation
about the deprecation. More is needed here, including a migration
example.
2012-07-30 18:01:47 +02:00
Matthias Clasen
0ac56e9dcc gdk: Deprecate thread functions
This commit deprecates gdk_threads_init, gdk_threads_enter,
gdk_threads_leave and gdk_threads_set_lock_functions. Using GTK+
from multiple threads does not work at all on Windows, and is
problematic on other platforms as well. We want to move to a world
where all GTK+ calls are made from the main thread.
Use g_main_context_invoke, g_idle_add and related functions if you
need to schedule GTK+ calls from other threads.

http://bugzilla.gnome.org/show_bug.cgi?id=680754
2012-07-30 18:01:47 +02:00
Matthias Clasen
144a5687c9 gdk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
2012-07-30 18:01:47 +02:00
Rob Bradford
7c51d67e7c wayland: Fallback to setting transient windows if no seat available
If we don't have a wl_seat - because a grab hasn't been initialised by GTK+
then fallback to making the shell surface transient to the parent rather than
a popup surface.
2012-07-18 16:16:56 +01:00
Rob Bradford
8a39d2269e wayland: Don't compare against GdkWindowTypeHint as a bitmask
The hint was being compared as a bitmask which means types that were not in
the list were being erroneously matched
2012-07-18 16:08:36 +01:00
José Dapena Paz
c5ef4e660b wayland: Add default settings implementation for Wayland backend.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-17 11:31:54 +01:00
José Dapena Paz
33e928e472 wayland: Initial version of keyboard key event handling
Review comment: I think the implementation of the vfuncs in gdkkeys-wayland.c
depend on that we're using the keysysm as the hardware keycode. I think that
needs to be evaluated for the future. But for now this patch gives reasonably
complete keyboard input.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
José Dapena Paz
d2c66e5afd wayland: Hook up _get_num_lock / _get_caps_lock to read from XKB state
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
Rob Bradford
bef037f5d2 wayland: Remove unused function declaration 2012-07-16 20:11:41 +01:00
Rob Bradford
b5773b89cf wayland: Remove annoying whitespace 2012-07-16 20:11:41 +01:00
José Dapena Paz
a4c80bd9cb wayland: Create and expose an xkb_state on the keymap object
This is then logically associated with the input device since each (keyboard)
input device has its own keymap.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
José Dapena Paz
d2267824b3 wayland: Refactor the keymap handling so it is associated with device
Although GDK expects the keymap to be associated with the display under
Wayland this is really associated with the input device so expose this by
finding the first keyboard device.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 20:11:41 +01:00
Rob Bradford
21f4b1cb35 wayland: Use the correct union member for axis events
Otherwise we end up overriding other members of the struct (in this case the
device pointer) and generate an error.
2012-07-16 15:38:09 +01:00
José Dapena Paz
a93f246056 wayland: implementation of pointer_handle_axis.
We translate wayland pointer axis events to GDK smooth scroll events, to
implement pointer_handle_axis events.

https://bugzilla.gnome.org/show_bug.cgi?id=679986
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-07-16 15:37:53 +01:00
Rob Bradford
d8d4eb3faa wayland: Implement the keyboard_enter/keyboard_leave events
This code is derived from the old keyboard focus change event handling.
2012-07-16 13:44:29 +01:00
Rob Bradford
3f0f328fd1 wayland: data_device.data_offer now has a safe object wrapper
The prototype for the listener has changed to provide a typesafe object rather
than an id that you have to bind into an object yourself.
2012-07-16 13:44:29 +01:00
Rob Bradford
1d080a01c1 wayland: Process the keymap that is sent over from the compositor
Load the keymap from the file descriptor that the compositor has sent us and
then save that into our internal object for future use.
2012-07-16 13:44:29 +01:00
Rob Bradford
19d16f8b80 wayland: Expose _gdk_wayland_display_get_keymap internally 2012-07-16 13:44:29 +01:00
Rob Bradford
91a11ee277 wayland: Ensure we destroy the shell surface when destroying the surface
Otherwise we can try and use an invalid object that the compositor has already
deleted.
2012-07-12 15:58:38 +01:00
Rob Bradford
8bd1478596 wayland: wl_shell_surface_set_popup requires a valid seat and serial
If we don't have our own grab then get the grab from the parent.
2012-07-12 15:58:38 +01:00
Rob Bradford
5b81186be3 wayland: Protocol update: wl_pointer_set_cursor takes a serial 2012-07-12 15:58:38 +01:00
Rob Bradford
310fd40357 wayland: Protocol update: wl_shell_surface_resize and _move take serials 2012-07-12 15:58:38 +01:00
Rob Bradford
9f039e5b74 wayland: Save the serial number for the ping event 2012-07-12 15:58:38 +01:00
Rob Bradford
a4f032f1ea wayland: Save the serial numbers for the pointer events 2012-07-12 15:58:38 +01:00
Rob Bradford
7fe87016f3 wayland: Add internal API for handling Wayland serial numbers
We need to keep track of the serial numbers for various API requests.
2012-07-12 15:58:38 +01:00
Rob Bradford
17d1c3c833 wayland: Ensure that _get_client_pointer returns a pointer
The previous implementation could return a device that is a keyboard.
2012-07-12 15:58:38 +01:00
Rob Bradford
77791f0708 wayland: Port to libxkbcommon API changes
xkb_string_to_keysym -> xkb_keysym_from_name
xkb_keysym_get_name -> xkb_keysym_get_name
2012-07-12 15:58:38 +01:00
Rob Bradford
93a338245a wayland: Switch to new wayland cursors mechanism 2012-07-12 15:58:38 +01:00
Rob Bradford
33b9f8e1b8 wayland: Protocol change: wl_buffer_damage
wl_buffer_damage is no longer necessary - it is sufficient to damage the
surface that the buffer is attached to instead.
2012-07-12 15:58:38 +01:00
Rob Bradford
6cdb75256e wayland: Protocol change: configure event
The 'time' value has been removed.
2012-07-12 15:58:38 +01:00
Rob Bradford
0d1ae2e0dd wayland: Protocol change: wl_shell_surface_* take surfaces for parents
These functions used to take shell_surface objects and now take surface
objects the parents.
2012-07-12 15:58:38 +01:00
Rob Bradford
8d7869ecbb wayland: Remove unused variable 2012-07-12 15:58:38 +01:00
Rob Bradford
598c1b27fe wayland: Temporary disable/hackaround keyboard code 2012-07-12 15:58:38 +01:00
Rob Bradford
f20ac38315 wayland: Port to SHM pool allocation mechanism 2012-07-12 15:58:38 +01:00
Rob Bradford
3eb0b195ed wayland: Port to new input protocol mechanism
This replaces the wl_input_device with wl_pointer, wl_keyboard, wl_touch all
tied together under a wl_seat.

This is quite a radical change in protocol and for now keyboard handling is
disabled.
2012-07-12 15:58:38 +01:00
Rob Bradford
b1a5b19b4a wayland: Load cursor theme using new Wayland cursor library
This requires the SHM object be initialised - therefore this is the most
logical (if slightly ugly place.)

We also need to make sure that we do something clever to load the correct
cursor theme.
2012-07-12 15:58:38 +01:00
Rob Bradford
2928ffc7b1 wayland: Remove unhelpful debug message 2012-07-12 15:58:37 +01:00
Rob Bradford
936ceb84b5 wayland: Protocol change: ping event on shell_surface 2012-07-12 15:58:37 +01:00
Rob Bradford
a9dc48ce94 wayland: Update to new header path for xkbcommon 2012-07-12 15:58:37 +01:00
Phil Clayton
bd3e3974c9 Change signal parameter names in GdkWindow to be valid C identifiers
https://bugzilla.gnome.org/show_bug.cgi?id=679228
2012-07-11 07:24:47 -04:00
Chun-wei Fan
fd6ce9975e Bug 676077: Fix handling of Keyboard Input on Windows
Don't use ASCII control characters to denote the input of Esc, Tab,
Return/Enter, Backspace and Delete, as it seems that it is not how
Windows handle them, and they cause weird characters to appear in the
input field on GTK+3 programs in non-English Windows.  Instead, let
these keys be handled as-is on Windows, like what is done in GTK+-2.x.

Checked with mclasen on IRC, and thanks to the people who verified the
patch to not break anything on English Windows.
2012-06-25 23:23:01 +08:00
Matthias Clasen
116b5e560f GdkDevice: Fix an inverted assertion
gdk_device_list_slave_devices only makes sense to call on master
devices, yet its g_return_if_fail check made it reject such devices.

Pointed out by monty.
2012-06-20 22:44:32 -04:00
Руслан Ижбулатов
bba72eae50 Fix windres invocation
Signed-off-by: Chun-wei Fan <fanchunwei@src.gnome.org>
2012-06-19 12:16:15 +08:00
Torsten Schönfeld
61972a3f8d gdk: annotate the attributes_mask type for gdk_window_new
https://bugzilla.gnome.org/show_bug.cgi?id=670369
2012-06-11 22:34:35 +02:00
Torsten Schönfeld
ab976ac8c1 gdk: add a missing annotation to GdkEventProperty
Its 'state' field is of type GdkPropertyState.

https://bugzilla.gnome.org/show_bug.cgi?id=677775
2012-06-10 22:22:19 +02:00
Torsten Schönfeld
e6149931c9 gdk: add missing annotations to gdk_event_get_scroll_deltas
https://bugzilla.gnome.org/show_bug.cgi?id=677774
2012-06-10 22:21:32 +02:00
Matthias Clasen
f27ed9ae80 Correct the docs for GDK_MSB_FIRST
https://bugzilla.gnome.org/show_bug.cgi?id=571254
2012-05-26 14:40:12 -04:00
Emmanuele Bassi
11aac235bc docs: Escape bare '#' in GdkRGBA string definitions
GTK-Doc does not like bare '#', so let's turn them into &num;.
2012-05-20 13:45:05 +01:00
Matthias Clasen
5a47f22f5b Add since annotations to some enum values
The things related to touch and smooth scrolling were 3.4 additions,
so mark them as such.

https://bugzilla.gnome.org/show_bug.cgi?id=676329
2012-05-19 12:20:58 -04:00
Natanael Copa
d6aee922bb Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
The isnan() and isinf() are C99 macros not functions so use
AC_CHECK_DECL instead of AC_CHECK_FUNCS for those.
2012-05-16 23:55:40 -04:00
Matthias Clasen
16458b0de2 Fix a case of 'stuck grab'
This was showing up when using a combo box in list mode. After popping
up the list, the keyboard grab appeared stuck. What was stuck here is
only the client-side grab, since we forgot to clean up our grabs
when receiving an UnmapNotify.

This bug was introduced in 1c97003664.
2012-05-16 17:34:36 -04:00
Cosimo Cecchi
7babd3847a gdk: fix the build
Regression from commit 861c57e304
2012-05-15 13:27:21 -04:00
Bastien Nocera
861c57e304 gdkoffscreenwindow: Don't crash when resetting cursor
When the toplevel is a GdkOffscreenWindow which doesn't
implement the set_device_cursor() vfunc, we would have
crashed. Implement a dummy ->set_device_cursor vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=675809
2012-05-15 18:05:36 +01:00
Bastien Nocera
0c6b54aa44 Revert "gdk: Don't crash when resetting cursor"
Patch didn't get reviewed yet.

This reverts commit 779591b62f.
2012-05-15 17:57:33 +01:00
Bastien Nocera
779591b62f gdk: Don't crash when resetting cursor
When the toplevel is a GdkOffscreenWindow which doesn't
implement the set_device_cursor() vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=675809
2012-05-15 17:49:33 +01:00
Edward Sheldrake
f77b690e26 GDK X11 DND: Fix infinite loop
Related: https://bugzilla.gnome.org/show_bug.cgi?id=664646
2012-05-14 23:02:23 -04:00
Kristian Rietveld
d4b38c5806 quartz: Ignore events from all mouse buttons past the resize boundary
Before, right click events were still let through into GDK. In this
case, also middle/right button events with x-coordinates in the range
[-3, 0] are processed, resulting in failures/crashes in the window
finding code because no GdkWindows are present in this range.
2012-05-13 18:20:12 +02:00
Alexander Larsson
859b6888c7 [broadway] Fixup build
Seems the return value of device_query_state was removed, it was
TRUE always anyway.
2012-05-11 14:49:15 +02:00
Michael Natterer
7915388017 quartz: handle yet another dead tilde variant
which is delivered by the US-International keyboard layout.
2012-05-08 16:07:31 +02:00
Benjamin Otte
78638f798b broadway: Fix vfunc prototype 2012-05-07 04:12:29 +02:00
Marc-André Lureau
4884a7c1af gdk: do not send leave event on touchpad button release
This is along the changes introduced in
bd55519f7e,
A TOUCHPAD device behaves like a mouse"

https://bugzilla.gnome.org/show_bug.cgi?id=674549
2012-05-05 14:39:37 -04:00
Bastien Nocera
c1f01eb929 Add support for disabling middle click paste
Adds a gtk-enable-primary-paste setting that is backed by
and X setting, and make GtkEntry and GtkTextView respect it.

https://bugzilla.gnome.org/show_bug.cgi?id=665243
2012-05-03 21:59:54 -04:00
Dan Winship
154ce014a8 gdk: add bindings-friendly alias for GDK_EVENT_2BUTTON_PRESS
GDK_EVENT_2BUTTON_PRESS and GDK_EVENT_3BUTTON_PRESS can't be used from
some bindings because they'd translate to something syntactically
invalid. Add GDK_EVENT_DOUBLE_BUTTON_PRESS and
GDK_EVENT_TRIPLE_BUTTON_PRESS aliases to work around that.

https://bugzilla.gnome.org/show_bug.cgi?id=671025
2012-05-03 21:22:39 -04:00
Matthias Clasen
823ee6d529 Fix unclosed comments 2012-05-03 16:11:14 -04:00
Chun-wei Fan
a5626c489e Bug 670499-gdk/gdkrgba.c: Include fallback-c89.c
Include (gdk/)fallback-c89.c as isnan() and isinf() is used.
2012-05-03 11:55:20 +08:00
Chun-wei Fan
4f56f53ad7 Bug 670499-Add gdk/fallback-c89.c
Add a fallback-c89.c for the gdk/ subdirectory as there is code that uses
functions that are introduced by C99.  This currently adds fallback
implementations for MSVC for isnan() and isinf()

Dist this "new" source file as well
2012-05-03 11:55:11 +08:00
Matthias Clasen
3be5c09a90 Add some more documentation about GDK_SCROLL_SMOOTH 2012-04-30 22:28:08 -04:00
Benjamin Otte
12846d821c versionmacros: min-require the current stable version
.. instead of the previous stable version.

This ensures that if we use GDK_DEPRECATED_IN_3_6, it will actually emit
a warning in GTK 3.5, and not wait with that until GTK 3.7. This is
particularly useful for stuff that gets deprecated right now. This code
should emit warnings right now, so we know what we're doing while
deprecating.
2012-05-01 03:13:01 +02:00
Benjamin Otte
7bb19b85c2 docs: Fix copy/paste typo 2012-05-01 03:13:01 +02:00
Owen W. Taylor
0aa989ae76 GtkPlug: fix handling of key events for different layouts
GtkPlug directly handles X KeyPress/Release events, instead of using
translation in GDK (which expects XI2 events for XI2). When this
was done, the handling of the group was stubbed out and never replaced.

Export gdk_keymap_x11_group_for_state() and gdk_keymap_x11_is_modifier()
so we can fill out the fields correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=675167
2012-04-30 16:35:10 -04:00
Mark Vender
d9eb667776 Regenerate the gdk/gdkkeysyms.h and gdk/gdkkeysyms-compat.h files
https://bugzilla.gnome.org/show_bug.cgi?id=673259
2012-04-25 20:29:36 -04:00
Mark Vender
d13740b2ba Fix the gdk/gdkkeysyms-update.pl to reflect new upstream location
https://bugzilla.gnome.org/show_bug.cgi?id=673259
2012-04-25 20:29:29 -04:00
Rob Bradford
af8e4ee8e7 wayland: Calculate window position offset to give emulated root coordinates
This allows combo box popup windows to appear in the correct place. This is a
workaround emulating root coordinates by calculating the offset for a chain
of windows that that are relative to each other.
2012-04-25 14:36:08 +01:00
Rob Bradford
568b310eb3 wayland: Only update position if the with_move flag is set
This was causing the combobox popup to be moved to (0,0) when just the
size was asserted.
2012-04-25 12:00:40 +01:00
Rob Bradford
55261f4e3f wayland: Improve error message handling in cursor buffer code 2012-04-25 12:00:40 +01:00
Sam Thursfield
2e873e3fdc Fix build with XInput < 2.2
Fixes regression introduced in fa8e6f7857
2012-04-24 12:55:39 +01:00
Cosimo Cecchi
8bb3a2001f xi2: ignore extraneous events for smooth scroll
Since the event will be ignored anyway after it's translated (slave
devices are disabled), don't let it run in the smooth scroll code path,
as it will burn our caches for the actual event we're interested in.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:06:39 -04:00
Cosimo Cecchi
37149668c0 xi2: fix thinko in variable type
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:01:08 -04:00
Matthias Clasen
5a41b74c5c XI2: More logging for smooth scrolling
In addition to the delta, log device information.
This was triggered by
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:00:47 -04:00
Rob Bradford
1aa2a7f821 wayland: Improve the error reporting in the Cairo GL surface code path 2012-04-19 17:59:09 +01:00
Rob Bradford
b5845514ec wayland: Improve error messages during SHM buffer creation
Use g_critical rather than fprintf and and also grab the error messages from
errno and from Cairo
2012-04-19 17:58:59 +01:00
Cosimo Cecchi
8febbcaf6a gdk: add missing GDK_VERSION_3_6 symbol 2012-04-18 13:23:29 -04:00
Rob Bradford
cd831b1390 wayland: Expose GdkWaylandDisplayManager as a public GType
This permits a runtime test of whether we are running on the Wayland platform
or not.
2012-04-17 18:40:41 +01:00
Rob Bradford
6f9ad538d9 wayland: Rename GdkScreenWayland to GdkWaylandScreen
This makes it consistent with the functions in the vtable and also consistent
with other backends.
2012-04-17 14:11:31 +01:00
Rob Bradford
fc58ff1e6a wayland: Rename GdkDisplayWayland to GdkWaylandDisplay
This makes it consistent with the functions in the vtable and also consistent
with other backends.
2012-04-17 14:11:31 +01:00
Benjamin Otte
a52336bedc gdk: Add deprecation/availability macros for 3.6 2012-04-17 08:59:07 +02:00
Kristian Høgsberg
ea78bcb7c5 wayland: Prefer X11 backend over Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=674102
2012-04-16 18:53:54 +02:00
Rob Bradford
71ca53993e wayland: Use an ARGB buffer for the Cairo and SHM surface 2012-04-16 15:09:14 +01:00
Rob Bradford
cddfcf1418 wayland: Force an expose for the whole area when scrolling 2012-04-16 15:09:14 +01:00
Rob Bradford
cdf5c2af62 wayland: Add support for rendering into an SHM buffer with Cairo image backend
The first version of this change included a bug that meant that if you don't
compile for any other backend then it wouldn't search for cairo. Credit for
identifying the bug goes to darxus@chaosreigns.com.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672361
2012-04-16 15:09:14 +01:00
Rob Bradford
6977ea0bd1 wayland: Move the buffer creation to the cairo surface creation 2012-04-16 14:12:51 +01:00
Rob Bradford
d9ca1a8636 wayland: Move the finalize function to allow a clear logical block of code 2012-04-16 14:12:51 +01:00
Rob Bradford
a8d03c9970 wayland: Remove unused member from struct 2012-04-16 14:12:51 +01:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Pavel Holejsovsky
94116aec8e Fix sourcedir!=builddir .gir build from source tarball
Setting -I$(top_builddir) before -I$(top_srcdir) causes that
g-ir-scanner picks up boxing definitions generated by glib-mkenums.

https://bugzilla.gnome.org/show_bug.cgi?id=672133
2012-04-11 20:05:10 +02:00
Kristian Rietveld
7e778aa033 [quartz] Fix manual resizing of windows
In the Quartz backend, there are two methods by which windows are
resized. The first method is fully handled by Quartz and does not appear
in the event stream the application resizes. The second method is when
we resize windows by ourselves. In OS X this happens when a GTK+ resize
grip is used. This resize grip is larger than the Quartz resize grip.
When the resize is started outside the "Quartz area", we have to handle
it by ourselves.

This patch fixes this manual window resizing by ignoring events while we
are in the process of resizing (such that the events actually arrive at
the sendEvent handler of GdkQuartzWindow where this resize is handled).
When the resize has finished we break all grabs such that GDK is not
stuck thinking the cursor is still in the resize window.
2012-04-10 21:54:03 +02:00
Kristian Rietveld
d5ac2bd372 Export break_all_grabs() within Quartz backend
Function was renamed to _gdk_quartz_events_break_all_grabs().
2012-04-10 21:50:07 +02:00
Benjamin Otte
826360a214 x11: Add suggested braces around empty body in 'if' statements 2012-04-07 13:01:24 +02:00
Matthias Clasen
2ef4b930c7 Don't force BUTTON1_MASK on non-touch events
This problem was pointed out by Hans de Goede in
https://bugzilla.gnome.org/show_bug.cgi?id=673458
2012-04-06 20:25:21 -04:00
Matthias Clasen
432f0151eb xi2: Remove touchscreen heuristics
It doesn't make sense to consider a device a touchscreen if it
doesn't have any touch classes. Even if it has 'touch' in its
name.
https://bugzilla.gnome.org/show_bug.cgi?id=673440
2012-04-06 20:00:35 -04:00
Rui Matos
7b0fd635fa x11: Don't ignore button releases after a wmspec move/resize
_gdk_x11_moveresize_configure_done() isn't called for wmspec
moves/resizes so we don't have a way to notice when a wmspec
move/resize ends and consequently untrigger the sending of
_NET_WM_MOVERESIZE_CANCEL which results in this message always being
sent on the next button release event. In that case we are marking
that event as handled so it isn't processed further which breaks
button press/release event handling in several widgets.

To fix this we simply allow the normal event handling machinery to run
after sending the _NET_WM_MOVERESIZE_CANCEL message.

https://bugzilla.gnome.org/show_bug.cgi?id=673328
2012-04-05 10:12:16 +02:00
Rui Matos
987baaba5c x11: Set GdkToplevelX11.have_focused on creation
Since the order in which _NET_WM_STATE and _NET_WM_DESKTOP are set, or
even *if* they are set, isn't defined, we could end up unsetting
GDK_WINDOW_STATE_FOCUSED given that both handlers for these two X
properties end up doing window state changes for all states. As we
want GDK_WINDOW_STATE_FOCUSED to be set by default we need to set its
master flag by default as well.

https://bugzilla.gnome.org/show_bug.cgi?id=673125
2012-04-04 17:14:06 +02:00
Alexander Larsson
c5a8f3cb61 gdk: Remove GdkDisplay->ignore_core_pointer
This is not used anywhere anymore
2012-04-03 11:37:42 +02:00
Alexander Larsson
24f9ca92ab win32: Fix up wintab support
We now have a proper MASTER/SLAVE input device split, where
the masters are virtual core input devices and we add fake hw
slave devices for the system pointer and real slave devices for
wintab devices.

We also set the proper source_device on the events so you can
tell which device sent it and properly decode the axis info.
2012-04-03 11:37:42 +02:00
Alexander Larsson
ddd24761fd Add _gdk_device_get_axis_info
This is needed for the win32 master/slave handling code.
2012-04-03 11:37:41 +02:00
Matthias Clasen
88a1d4d5a1 x11: Deal better with L-shaped monitor arrangements
The code for calculating the per-monitor workarea was ignoring
the fact that the EWMH workarea property can only handle rectangular
workareas, and thus can't really do justice to general monitor
arrangements. As a workaround, we ignore it for anything but
the primary monitor. And we ignore it for the primary monitor
as well if it does not even cover it.

https://bugzilla.gnome.org/show_bug.cgi?id=672163
2012-03-23 09:09:14 -04:00