Commit Graph

6847 Commits

Author SHA1 Message Date
Matthias Clasen
1057f249bd wayland: Add debug output for pixel formats
Use GDK_DEBUG=misc to see information about wl_shm pixel formats
supported by the compositor.
2016-03-26 16:08:01 -04:00
Matthias Clasen
f06fc8d378 Deprecate gdk_visual_get_colormap_size
Since we don't have API for colormaps anymore, this is not
a useful function.
2016-03-26 15:15:28 -04:00
Matthias Clasen
ce0074b034 Deprecate gdk_visual_get_byte_order
This function is only useful when working with XImages,
and is not meaningfully implemented in other backends.
2016-03-26 15:07:09 -04:00
Matthias Clasen
c6cdddd68d wayland: Fix up visual implementation
Don't return visuals that don't match the requested depth
and/or visual type.
2016-03-26 14:58:48 -04:00
Matthias Clasen
aa4c5459b7 Deprecate gdk_visual_get_bits_per_rgb
This function is pretty useless, since the Wayland backend returns
0 for this, and the Windows backend 42 (!).
2016-03-26 14:20:23 -04:00
Matthias Clasen
c448061d49 Add version macros for 3.22 2016-03-26 14:08:10 -04:00
Matthias Clasen
e48e29db3b wayland: Fully initialize the visual
The pixel details (mask, shift and precision) are supposed to
be filled in for TrueColor visuals.
2016-03-26 10:10:57 -04:00
Matthias Clasen
8206b824fa Make gdk_visual_get_*_pixel_details work again
These functions are supposed to return the numbers of consecutive
1 bits in each components mask as precision. However, due to a
copy-paste mistake when this code was moved around in
commit 70d689cddd, the precision
was always reported as zero. This affects only a few applications
that directly set window background on X11 windows, such as emacs.

https://bugzilla.gnome.org/show_bug.cgi?id=764210
2016-03-26 09:35:53 -04:00
Руслан Ижбулатов
b9b67e05e1 GDK W32: Optimize clipboard handling a bit
Delay as long as possible before calling OpenClipboard(),
call CloseClipboard() as quickly as possible after that.
Don't call OpenClipboard() when we don't need to (for example,
we don't need to open clipboard to call GetClipboardOwner()).

Also, print out actual W32 error code in some cases where it
was not printed before.

https://bugzilla.gnome.org/show_bug.cgi?id=763907
2016-03-26 00:03:50 +00:00
Руслан Ижбулатов
692c3b11ff GDK W32: Print error code along with the error message
Error codes can be easily looked up in an error code list
and/or googled up. Error messages, while descriptive, often
describe the wrong thing, and the messages themselves are not
part of the documentation of a function, unlike error codes.
It would be preferable to have the code, or both.

https://bugzilla.gnome.org/show_bug.cgi?id=763913
2016-03-25 22:04:58 +00:00
Руслан Ижбулатов
c4c00299b2 GDK W32: Print more debug info about events
1) Print timestamps for events
2) Print wParam and lParam (in hex form) for messages

https://bugzilla.gnome.org/show_bug.cgi?id=763913
2016-03-25 22:04:57 +00:00
Christoph Reiter
3f077ec36f quartz: fix pixelated image surfaces in retina/hidpi mode
gtk+ currently depends on the scaling factor and the cairo device scale
of both the backend surfaces and image surfaces to be equal.

Until now we didn't apply a cairo device scale at all and depended on the
automatic scaling of CGContexts. This works when drawing with cairo but
fails in case of image surfaces, which get requested at a too small size.

To make the quartz backend behave more like the X11 one, set the cairo device
scale on the surface in gdk_quartz_ref_cairo_surface(). As this conflicts
with the default scaling done by CGContext (we would get double scaling)
undo the CGContext scaling using CGContextScaleCTM().

This patch is based on the following patches by Brion Vibber:
    https://bugzilla.gnome.org/show_bug.cgi?id=740199#c4
    https://bugs.freedesktop.org/show_bug.cgi?id=69796#c4

https://bugzilla.gnome.org/show_bug.cgi?id=763779
2016-03-23 16:27:10 +01:00
Christian Hergert
c48bc48dda wayland: avoid dropping surfaces when possible
If the configure-event gives us the same size as we had before,
which is common for animation resizes, then try to keep the
existing buffer around. This saves us a memfd_create() syscall
on every frame.

https://bugzilla.gnome.org/show_bug.cgi?id=763350
2016-03-21 22:03:20 -04:00
Carlos Garnacho
219eedd7c8 wayland: Rename internal functions with misleading naming
Now that GdkWaylandDeviceData is gone, the functions prefixed
"gdk_wayland_device_" and taking a GdkWaylandSeat as first
parameter feel out of place. Renaming those makes it more obvious
that it's seat functions.

https://bugzilla.gnome.org/show_bug.cgi?id=763859
2016-03-21 17:15:59 +01:00
Carlos Garnacho
1597f31eba wayland: Remove GdkWaylandDataDevice typedef
It's no longer used.

https://bugzilla.gnome.org/show_bug.cgi?id=763859
2016-03-21 17:15:59 +01:00
Carlos Garnacho
81f0d23744 wayland: Replace all remaining uses of GdkWaylandDeviceData
And use GdkWaylandSeat in all of those. The variable names have also
been updated.

https://bugzilla.gnome.org/show_bug.cgi?id=763859
2016-03-21 17:15:59 +01:00
Carlos Garnacho
c9f9163544 wayland: Remove GdkWaylandDeviceData pointer in GdkWaylandDevice
It's the same than gdk_device_get_seat() nowadays. Also, rename the
usages of GdkWaylandDeviceData to GdkWaylandSeat in the functions
affected by the removal.

https://bugzilla.gnome.org/show_bug.cgi?id=763859
2016-03-21 17:15:59 +01:00
Matthias Clasen
068d382689 dnd: Hide the drag window when we're done
We were just relying on the drag context finalize() to destroy
the window. But with garbage-collected bindings, that might
not happen as soon as we like, so explicitly hide the window
when the drag ends successfully.

https://bugzilla.gnome.org/show_bug.cgi?id=763659
2016-03-21 11:26:24 -04:00
Matthias Clasen
de4cb363c2 Document gdk_wayland_seat_get_wl_seat 2016-03-20 22:49:33 -04:00
Matthias Clasen
e4d3987b17 gdk: Add a missing Since tag
gdk_drag_context_manage_dnd was introduced this cycle.
2016-03-20 22:45:06 -04:00
Matthias Clasen
1c692c64fe gdk: Reword some docs 2016-03-20 22:29:37 -04:00
Benjamin Otte
9782a2b729 broadway: Use explicit sizes for payload length
The previous greater than comparisons would never trigger the 2nd case.

http://www.viva64.com/en/b/0383/
2016-03-20 05:51:42 +01:00
Benjamin Otte
318a9c4634 x11: Use g_error_matches()
Fixes accidentally assigning values.

http://www.viva64.com/en/b/0383/
2016-03-20 05:43:02 +01:00
Benjamin Otte
471cdee97f broadway: Remove duplicate initialization
http://www.viva64.com/en/b/0383/
2016-03-20 05:31:20 +01:00
Benjamin Otte
5db1c987ee x11: Remove duplicate variable setting
http://www.viva64.com/en/b/0383/
2016-03-20 05:30:51 +01:00
Руслан Ижбулатов
7d2a7a5626 GDK W32: Don't move iconic windows
Using UpdateLayeredWindow() on iconic windows brings them *back* from
their iconic (minimized) state. That is bad.
As a precaution, also don't use SetWindowPos() on iconic windows.
This means that iconic windows can't be moved. That is fixable
by using SetWindowPlacement(), but there is no pressing need to do so,
as there are very few cases when windows need to be moved while minimized.

https://bugzilla.gnome.org/show_bug.cgi?id=763835
2016-03-18 07:49:39 +00:00
Christian Hergert
1bd5be6b7c quartz: fix quartz build
More fallout from recent refactoring.

See also b3860e407d.
2016-03-17 21:18:58 -07:00
Руслан Ижбулатов
5ac848d229 GDK W32: Fix shown window position calculation for dialogs and splashes
Two errors here:
1) A typo in splashscreen rectangle calculation - sets right twice
   instead of setting top
2) Centering for dialogs is off because it doesn't convert
   GDK virtual desktop coordinates to Windows WM virtual desktop
   coordinates by adding _gdk_offset_*

https://bugzilla.gnome.org/show_bug.cgi?id=763628
2016-03-14 16:31:14 +00:00
Carlos Garnacho
2923f69d3c gdkdnd: Add private means to commit the drag status
The way gdk_drag_status() may be called multiple times during the
processing of drag and drop events throughout the widget hierarchy
brings some superfluous messaging going in, esp. when it's the last
request the one we want to honor, yet we emit messaging requests on
all.

This is barely appreciable in the X11 backend, but due to the design
of the wayland protocol, quick series of changes like this it have
some self-amplificating consequences which may end up flooding the
connection.

We can delegate this to a late "commit" call, performed within GDK
event management. This way gdk_drag_status() calls may be cached
and only result in windowing messaging once per ::drag-motion or
::drag-data-received event. Emitting the final status will also
avoid spurious action changes on the compositor and the other peer.

https://bugzilla.gnome.org/show_bug.cgi?id=763298
2016-03-14 16:50:36 +01:00
Руслан Ижбулатов
ab16b19a0a GDK W32: Fix pointer-under-window code for custom resize
This code:
>  gdk_window_get_root_origin (window, &x, &y);
>  x -= root_x;
>  y -= root_y;
>  pointer_window = gdk_device_get_window_at_position (device, &x, &y);
was meant to find the child gdk window at coordinates root_x and root_y.

These 4 lines had 2 bugs:
1) x = x - root_x (same for y) is wrong, it should be x = root_x - x
2) gdk_device_get_window_at_position() does not give you the window
   at position x and y. It gives you the window under the device
   (mouse pointer) and the returns the device coordinates in x and y.

https://bugzilla.gnome.org/show_bug.cgi?id=763533
2016-03-14 15:06:51 +00:00
Руслан Ижбулатов
a97e8fd078 GDK W32: Fix a typo 2016-03-12 12:14:04 +00:00
Matthias Clasen
4d84e7a8f7 Trivial formatting fix 2016-03-11 21:42:33 -05:00
Friedrich Beckmann
8879052887 added NSEventTypeMagnify and NSEventTypeRotate for ZOOM and ROTATE gestures
MacOS provides the NSEventTypeMagnify which is very similar to the
Gtk ZOOM gesture and NSEventTypeRotate which is very similar to the
Gtk Rotate gesture. Those two event sequences are translated to a
sequence of GDK_TOUCHPAD_PINCH events. This sequence is then detected
in the upper gtk layers as Gtk Zoom/Rotate Gestures.

https://bugzilla.gnome.org/show_bug.cgi?id=760276
2016-03-11 09:59:01 -05:00
Jonas Ådahl
f8bbbbf684 gdk: Don't leak discarded window state event
When compressing window state events, we didn't free the discarded
event after removing it from the queue, causing us to leak it. This
commit makes sure to free the discarded event after unqueuing it.

https://bugzilla.gnome.org/show_bug.cgi?id=762468
2016-03-11 07:11:34 -05:00
Руслан Ижбулатов
65ea6f8736 GDK W32: Partially rollback the custom resize for GL windows
If a window is being drawn by OpenGL, we need to apply any
pending resizes to it *before* we paint.

https://bugzilla.gnome.org/show_bug.cgi?id=763287
2016-03-10 13:09:32 +00:00
Philip Chimento
b3860e407d quartz: Get core pointer from device manager
Some spots missed in the earlier refactor removing core_pointer from
the GdkDisplay struct.

https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-03-09 22:11:07 -08:00
Jonas Ådahl
8fb7f50028 wayland: Add request focus support via gtk_shell
A gtk_surface.present request was added to gtk_surface which takes
timestamp from some input event, and uses that timestamp to figure out
whether the window can be presented or not. If we don't have a
timestamp, we should just give up instead of making up our own,
otherwise we might steal someones focus.

https://bugzilla.gnome.org/show_bug.cgi?id=763037
2016-03-10 12:31:15 +08:00
Jonas Ådahl
ed430dc00a wayland: Add system bell support via gtk_shell
Invoke the system bell by calling the request added to the gtk_shell
protocol.

https://bugzilla.gnome.org/show_bug.cgi?id=763001
2016-03-10 12:31:15 +08:00
Jonas Ådahl
f68cf698fc wayland: Don't invent our own unstable protocol semantics
The gtk_shell protocol used some half baked unstable protocol semantics
that worked by only allowing binding the exact version of the
interface. This hack is a bit too confusing and it makes it impossible
to do any compatible changes without breaking things.

So, instead rename it to include a number in the interface names. This
way we can add requests and events without causing compatibility issues,
and we can later remove requests and events by bumping the number in
the interface names.

https://bugzilla.gnome.org/show_bug.cgi?id=763001
2016-03-10 12:31:15 +08:00
Carlos Garnacho
aaa467679d wayland: Make data_source_target() an empty stub
This request actually means nothing to the upper GDK layers,
we used to preempt a GDK_SELECTION_REQUEST event, but this is too
eager, and not like things work in X11.

Originally in wayland, this event may be used for feedback purposes.
We however don't perform any mimetype-based feedback, so we can
safely ignored.

This makes data_source_send() the only place where we actually
trigger GDK_SELECTION_REQUEST, this one is conceptually the same
than the X11 selection request event.
2016-03-09 18:39:16 +01:00
Carlos Garnacho
f61965233b wayland: Allow 0-size writes in selection/dnd
It's not something we should be forbidding explicitly, definitely
no-op is not the best option.
2016-03-09 18:39:15 +01:00
Carlos Garnacho
3da4b81427 wayland: Clear more thoroughly the source-side data on dnd_finished
The targets should also be unset.
2016-03-09 18:39:15 +01:00
Carlos Garnacho
ec2257e53c wayland: Unset the source-side DnD fd after passing it to the stream
The ownership is given to the stream, so unset it here.
2016-03-09 18:39:15 +01:00
Takao Fujiwara
7822f59a86 Set VirtualBox USB Tablet to GDK_SOURCE_MOUSE
The virtual host assigns the name of the mouse device to
"VirtualBox USB Tablet" in VirtualBox and we'd use that device as mouse.
If not, GtkTooltip is not enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=763017
2016-03-08 11:11:51 -05:00
Chun-wei Fan
15c9b3e692 GDK-Win32: Make update_stye_bits() available within the backend
Other portions of the GDK-Win32 backend make use of this function as
layered windows need to be disabled for GL windows and possibly other
parts, so make this function a private function that is available within
the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=763285
2016-03-08 13:26:59 +08:00
Chun-wei Fan
3f190e0fa6 Win32: Disable layered windows for GL
Layered windows and GL do not work well together, so disable layered
windows when initiating a GdkGLContext, so that GtkGLArea programs can run
properly.

Also based on patch by LRN to address the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=763080
2016-03-08 12:16:37 +08:00
Matthias Clasen
13a94b66b6 Sync default double-click time with GNOME
The default value for the double-click key in the
org.gnome.settings-daemon.peripherals.mouse schema is 400.
Use the same value as the declared default for the
gtk-double-click-time GTK+ setting, to avoid pointless
differences in corner cases.

https://bugzilla.gnome.org/show_bug.cgi?id=720950
2016-03-07 07:50:29 -05:00
Matthias Clasen
1388b111a8 wayland: Implement gtk-keynav-use-caret setting
This is anticipating the gsetting that will be introduced in
https://bugzilla.gnome.org/show_bug.cgi?id=763123
2016-03-07 07:35:36 -05:00
Paolo Borelli
8f25481406 win32: use a struct for the event source
This removes the event_poll_fd global variable and the (ab)use of
get_default_display. It is also more consistent with other backends.

Also store display
2016-03-05 20:31:10 +01:00
Paolo Borelli
58a49c1a4b win32: fix "unused variable" warning 2016-03-05 20:31:10 +01:00
Matthias Clasen
d8dee2952a gdk: Add an X setting for gtk-keynav-use-caret
This will let us toggle the use-caret setting session-wide.
2016-03-04 22:44:29 -05:00
Matthias Clasen
aadbabf998 wayland: Don't crash with offscreen windows
Use gdk_window_get_effective_toplevel when looking for
a suitable transient parent, to skip over offscreen windows
that we might encounter in the window tree. This fixes
a crash in glade.

https://bugzilla.gnome.org/show_bug.cgi?id=763110
2016-03-04 20:04:43 -05:00
Matthias Clasen
832742e1f3 x11: Trap errors around an XRandr call
Apparently, we can get X errors here. Ignore them.
https://bugzilla.gnome.org/show_bug.cgi?id=762907
2016-03-04 14:35:23 -05:00
Matthias Clasen
69479ceaef wayland: Clean up key repeat timeout
When returning G_SOURCE_REMOVE from a callback, we need
to reset the source id as well.
2016-03-04 13:56:26 -05:00
fiddlerwoaroof
f3f998efd7 Check if XRRGetOutputInfo returned a null pointer.
Fixes bug 763023: in certain circumstances, XRRGetOutputInfo will return
a null pointer.  This commit adds a check to detect and handle this
return value.
2016-03-03 21:31:26 -05:00
Руслан Ижбулатов
a55f1113f5 Remove unused variable 2016-03-03 18:00:44 +00:00
Руслан Ижбулатов
95fe3ec0c9 GDK W32: Fix redrawing during drag-move with no composition 2016-03-03 18:00:43 +00:00
Руслан Ижбулатов
ba89fbd72d GDK W32: Set default cursor from our own theme right away
Otherwise WM-dependent default cursor is used, which does not
match our theme. Worse, later GDK will realize that we have
our own left_ptr cursor and will apply it after all, making
the discrepancy even more noticeable.

https://bugzilla.gnome.org/show_bug.cgi?id=762902
2016-03-03 07:20:02 +00:00
Руслан Ижбулатов
84ddc6aab1 GDK W32: Force correct mouse cursor for custom resize/move
* Explicitly grab the device, setting appropriate cursor on it.
* Fix gdk_device_virtual_set_window_cursor() to just set the
  cursor, without trying to check that mouse is over the given
  window. Also prevent it from immediately resetting cursor.
* Alse take into account things that happen in other parts of
  GDK - don't look for replacement cursor, GDK already did that,
  and don't create a default arrow cursor instead of NULL,
  GDK-W32 already did that up the stack as well.
  Warn about inappropriate cursor == NULL argument instead.

https://bugzilla.gnome.org/show_bug.cgi?id=762711
2016-03-03 07:17:46 +00:00
Руслан Ижбулатов
f9ed3fdd7b GDK W32: Implement gdk_win32_screen_get_monitor_workarea()
https://bugzilla.gnome.org/show_bug.cgi?id=763012
2016-03-03 05:29:12 +00:00
Руслан Ижбулатов
c05f254a6e GDK W32: Use layered windows
Toplevels are now true layered windows that are moved,
resized and repainted via UpdateLayeredWindow() API call.
This achieves transparency without any extra effort,
and prevents window size and window contents desychronization
(bug 761629).

This also changes the way CSD windows are detected. We now
use window decorations to detect CSDiness of a window,
and to decide whether a window should be layered (CSD windows should
be) or not.

Decorations are now stored in the window implementation,
not as a quark-based property of the window-as-gobject.

https://bugzilla.gnome.org/show_bug.cgi?id=748872
2016-03-02 21:42:50 +00:00
Руслан Ижбулатов
e03946bd28 GDK W32: custom (non-WM) drag-move and drag-resize code
Normally works only on CSD windows, non-CSD windows continue
to use WM modal loop for drag-resizing and drag-moving. However,
if it is activated on non-CSD windows, it does work.

Has the advantage of being completely immune to AeroSnap.
AeroSnap only worked partially on CSD windows, with the only part
that worked being "don't let users drag window titlebar outside of
the desktop". Now AeroSnap doesn't work on windows moved by
this code at all, which is good, since they currently don't work
well with it due to the way shadows are drawn.

It's possible to also re-implement AeroSnap (or something similar),
but that is a story for another commit.

This code was originally intended to fix the problem of window
size and window contents desynchronization, but failed to achieve
that result in the end. Nevertheless, it serves as a foundation for
other changes to the way window resizing works.

https://bugzilla.gnome.org/show_bug.cgi?id=761629
2016-03-02 21:39:32 +00:00
Ray Strode
b5281837d6 wayland: synchronize key repeat with server
key repeat is handled client side, which means stalls in the compositor
dispatching key release events can lead to fictious repeat events.

This commit ties key repeat to a server roundtrip to ensure the client
and server are in sync.

https://bugzilla.gnome.org/show_bug.cgi?id=757942
2016-03-02 13:07:12 -05:00
Ray Strode
551f1742f5 wayland: handle key up events earlier in deliver_key_event
We don't need the key repeat rate or anything like that when
handling key up events, so do key up events first before querying
for that information.

https://bugzilla.gnome.org/show_bug.cgi?id=757942
2016-03-02 13:07:12 -05:00
Ray Strode
619799ba3b wayland: make deliver_key_event return void
deliver_key_event is sometimes called from a timeout handler and
sometimes called directly.  We currently erroneously return TRUE
(G_SOURCE_CONTINUE) in the case where it's called directly, but to
no ill effect, since we ignore that return value. In the future,
we're going to need to call it directly in other parts of the code
where the return value would be relevant and handling TRUE, would
require adding redundant code.

Instead, this commit just changes the code to always reset the timer
manually, and never rely on glib's ability to automatically reset
the timer by returning TRUE.  This makes the code smaller, too, since
there's less special casing required.

https://bugzilla.gnome.org/show_bug.cgi?id=757942
2016-03-02 13:07:12 -05:00
Rico Tzschichholz
1e27fe83ea mir: display->list_devices vfunc was dropped
See 4a6f8a065a

https://bugzilla.gnome.org/show_bug.cgi?id=762891
2016-03-02 10:24:44 +01:00
Olivier Fourdan
de383809f6 wayland: Check actual impl type in transient loop
If the parent of a transient is not a native Wayland window (e.g.
offscreen window), the transient loop check will crash.

Check for the actual type in the transient loop check and do not assume
the parent is necessarily Wayland native.

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

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2016-03-01 22:18:32 -05:00
Jonas Ådahl
9e2207b2b0 gdk: Compress window state events
If there are already a window state event for a given window queued
when the window state is changed, drop that event and queue a new event
with a changed_mask based on the state before last event that was queue
without compression.

https://bugzilla.gnome.org/show_bug.cgi?id=762468
2016-03-02 10:22:17 +08:00
Olivier Fourdan
3607b9aa2e wayland: Restore size when configure size is 0x0
According to xdg_shell, an xdg_surface.configure with size 0x0 should
be interpreted as that it is up to the client to set a size.

When transitioning from maximize or fullscreen state, this means the
client should configure its size back to what it was before being
maximize or fullscreen.

This problem currently only occurs on weston because weston sends a
configure with size 0x0 when transitioning back from maximize or
fullscreen.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=762713
2016-03-01 13:15:02 +01:00
Paolo Borelli
fa43edd244 gdk: implement gdk_display_list_devices using GdkSeat
Now that the function is factored out in a single place, we can
refactor it to not use deprecated API.
2016-02-29 21:54:01 +01:00
Paolo Borelli
4a6f8a065a gdk: remove the display->list_devices vfunc
gdk_display_list_devices is deprecated and all the backends
implement the same fallback by delegating to the device manager
and caching the list (caching it is needed since the method does
not transfer ownership of the container).
The compat code can be shared among all backends and we can
initialize the list lazily only in the case someone calls the
deprecated method.

https://bugzilla.gnome.org/show_bug.cgi?id=762891
2016-02-29 21:53:58 +01:00
Paolo Borelli
33ac51ea72 win32: init wintab when the device manager is constructed
No need to call a method explicitely after creating the object
2016-02-29 18:25:01 +01:00
Paolo Borelli
e9d2a622e2 win32: actually call _gdk_win32_screen_on_displaychange_event
41a371c435 factored out a method
but I forgot to actually amend the commit to call the new function
2016-02-29 18:25:01 +01:00
Ray Strode
316fe1dbbd wayland: deal with staging buffer getting allocated prematurely
The staging buffer gets allocated any time begin_paint is called
on the window. This can happen even with an empty paint region,
so we should cope with that situation. At the moment we crash
trying to post a runtime warning.

https://bugzilla.gnome.org/show_bug.cgi?id=762755
2016-02-29 10:52:00 -05:00
Paolo Borelli
38ad57948c gdk: remove the core_pointer field from GdkDisplay
It is not used anymore, so no need to set it

https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:15:04 +01:00
Paolo Borelli
502744be85 quartz: get the core pointer from the device manager
https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:15:04 +01:00
Paolo Borelli
539b1083de broadway: get the core pointer from the device manager
https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:15:04 +01:00
Paolo Borelli
363f9c9571 gdkdisplay: get the pointer device from the default seat
https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:05:00 +01:00
Paolo Borelli
807c0c0a56 gdkwindow: get the pointer device from the default seat
https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:05:00 +01:00
Matthias Clasen
ee217dc823 Add and use GDK_CHECK_DEBUG macro
This is following what we've already done in GTK+. It avoids
direct access to _gdk_debug_flags all over the place.
2016-02-28 21:40:30 -05:00
Matthias Clasen
2ad19c70ce x11: Don't use g_print for debug output
The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
2016-02-28 21:40:24 -05:00
Matthias Clasen
29c1263c4b wayland: Don't use g_print for debug output
The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
2016-02-28 21:40:23 -05:00
Matthias Clasen
2a2d254a8b quartz: Don't use g_print for debug output
The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
2016-02-28 21:40:23 -05:00
Matthias Clasen
2801f3c843 gdk: Don't use g_print for debug output
The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
2016-02-28 21:40:23 -05:00
Paolo Borelli
187027942c gdk: remove _gdk_event_queue_prepend
It is never used
2016-02-28 19:05:53 +01:00
Matthias Clasen
e0caafbcdf display: Don't change default seat in flight
gdk_display_add_seat was prepending new seats to the list, which
was effectively making the added seat the new default. Since that
is probably not intended, append to the list.
2016-02-28 12:31:20 -05:00
Matthias Clasen
664b166838 wayland: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
4f422d1f5b quartz: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
1c887b2287 gdk: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
697efcd4bc x11: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
94342300a8 broadway: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Paolo Borelli
72b40266bd gdkwindow: cleanup, avoid direct access to display members 2016-02-28 18:22:42 +01:00
Paolo Borelli
aaed73671c win32: close the screen when disposing the display 2016-02-28 15:53:52 +01:00
Emmanuele Bassi
d59c796a9d Fix builddir != srcdir
The gdkprivate-wayland.h header file is included from the top-level gdk
directory; this means that all included files referenced in the header
must be relative to the `gdk` directory, otherwise the build will fail
when the build directory is not equal to the source directory.

This commit fixes a build failure under continuous:

In file included from ../../gdk/gdkdisplaymanager.c:60:0:
../../gdk/wayland/gdkprivate-wayland.h:40:51: fatal error:
gtk-primary-selection-client-protocol.h: No such file or directory
 #include "gtk-primary-selection-client-protocol.h"
                                                   ^
compilation terminated.
Makefile:1155: recipe for target 'libgdk_3_la-gdkdisplaymanager.lo' failed
make[4]: *** [libgdk_3_la-gdkdisplaymanager.lo] Error 1
2016-02-28 12:21:26 +00:00
Paolo Borelli
41a371c435 win32: factor out on_displaychange_event method for the screen
This allows us to make more initialization methods private to the
screen object.
2016-02-28 12:19:08 +01:00
Paolo Borelli
48d693ea80 win32: make init_root_window private to the screen object
It can be called during the screen object initilization
2016-02-28 12:18:58 +01:00
Paolo Borelli
b20f80e65a win32: move function
Just reorder code in preparation to calling functions defined
before this one
2016-02-28 11:53:10 +01:00
Paolo Borelli
00f396dea9 win32: rename initialization function for clarity 2016-02-28 11:50:07 +01:00
Paolo Borelli
58e169c04c win32: do not confuse gtk-doc 2016-02-28 11:37:38 +01:00
Paolo Borelli
e48bd2e00b win32: move gdkvisual code in gdkscreen
Except for the init function, all the visual related code is made
of gdkscreen vfuncs, so let's move it to gdkscreen-win32. This way
we avoid keeping other static variables and instead store the info
inside the screen struct.
2016-02-28 11:37:38 +01:00