Commit Graph

7207 Commits

Author SHA1 Message Date
Daniel Boles
ac21aff55b GdkRGBA: Fix typo precentage => percentage 2017-07-06 13:59:53 +01:00
Jason Gerecke
3d9a945803 x11: Assign GDK_SOURCE_TABLET_PAD when necessary
Wacom tablets often have a "pad" device which houses multiple buttons. At
present, these devices are incorrectly marked as GDK_SOURCE_PEN which can
cause problems for some software.

https://bugzilla.gnome.org/show_bug.cgi?id=782040
2017-06-30 20:41:36 +02:00
Mart Raudsepp
bb13421fd3 GdkWaylandWindow: Fix version numbers in export_handle() docs
This change appeared first in 3.22.16 release, not 3.22.13.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-06-22 05:39:25 +03:00
Carlos Garnacho
9e740bd435 gdk: Set vid/pid on wayland tablets
This was missed so far... Use %.4x format, in order to behave just
the same than X11.
2017-06-16 19:30:10 +02:00
Dan Torop
d9a9530f28 wayland: selectively cancel key repeat on key release
Under Wayland, when multiple keys are pressed and the user releases a
key, key repeat should continue unless the key released is the one
currently repeating.

In the case of:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key2 repeat
- key2 release

The behavior should be to cancel keyboard repeat, though key1 is still
held down. This is consistent with prior X11/XWayland behavior.

The following also must work:

- key1 press
- key2 press
- key2 release
- key2 press
- key1 release
- key2 should continue to repeat

The fix for bug #778019 should continue to work:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key1 release
- key2 should repeat

The choice to change the counter nkeys to the flag repeat_active
helps to solve the second test case.

https://bugzilla.gnome.org/show_bug.cgi?id=781285
2017-06-02 19:18:05 +02:00
Olivier Fourdan
2d41d772d7 wayland: fix xdg_surface test in move/resize drag
begin_resize_drag() and begin_move_drag() check for xdg_surface being
not null, but those apply on xdg_toplevel so they should check for
xdg_toplevel being non-null instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781945
2017-06-02 15:54:50 +02:00
Olivier Fourdan
c94f40b893 wayland: check parent surface for subsurface
When an event is received while a tooltip is showing, the GtkTooltip's
event handling code can end up calling gdk_window_set_transient_for()
from gtk_tooltip_set_last_window().

The Wayland GDK backend will try to automatically create a subsurface
in gdk_wayland_window_set_transient_for() but if the parent surface is
gone meanwhile, this will will cause a crash when trying to create a
subsurface from a parent with a null surface.

Checking for the parent is not sufficient, we ought to check for the
parent surface as well to avoid the crash.

https://bugzilla.gnome.org/show_bug.cgi?id=782283
2017-06-02 15:43:34 +02:00
Olivier Fourdan
63e05158ea wayland: Do not map toplevel utility as popup
Applications can specify the type hint as utility even on toplevel
windows.

When that toplevel is also marked as a transient for another window,
GDK Wayland backend would translate that as an xdg_popup which is not
appropriate.

While utility temp windows should remain mapped as subsurfaces (such as
the ones used by treeviews), regular windows should not translate as
neither a subsurface nor an xdg_popup.

https://bugzilla.gnome.org/show_bug.cgi?id=781945
2017-06-02 15:16:13 +02:00
Debarshi Ray
bebd5020ec wayland: Don't warn if the display is lost, skip exit handlers
There is no need to have every application log a warning when the
Wayland display server goes away, and we are using _exit instead of
exit elsewhere.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=745289
2017-05-30 09:16:45 +02:00
Debarshi Ray
425e4df100 wayland: Don't abort when preparing the source if connection is lost
Aborting the application makes it look like an application bug, when
it is the expected thing to do when the Wayland display server goes
way. eg., when the user logs out. The log level is also demoted to
avoid a storm of warnings in the log from all applications whenever
this happens.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=783047
2017-05-25 11:53:15 +02:00
Jonas Ådahl
dba57db1f3 GdkWaylandWindow: Allow calling export() multiple time
Allow getting the same export handle multiple times by calling
gdk_wayland_window_export_handle() multiple times. For each time
export() is called, a unexport() must be called to unexport.

When the window is already exported, the exported callback is called
via a idle handler. If there are multiple export() calls, they are
invoked in order either when the handle is received by the display
server, or when the idle callback is invoked.

Calling unexport() will not affect future invokations of the exported
callback, unless all export() calls have their unexport() call count
matched.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-05-23 09:39:29 +08:00
Timm Bäder
eb8870c912 fallback-c89: Include config.h
It holds all the HAVE_<func> definitions.
2017-05-22 14:26:32 +01:00
Emmanuele Bassi
eba10161c1 build: Disable deprecation warnings in broadway
Avoid compiler warnings while building code that uses deprecated API.
2017-05-09 14:30:40 +01:00
Emmanuele Bassi
d9e0ea2905 build: Don't include the marshallers header file
We used to inject the inclusion of the generated header file into the
generated body of the marshallers source code in order to avoid compiler
warnings about missing prototypes. The glib-genmarshal utility has been
fixed in GLib to include the prototype in the generated source, so now
we're going to trip -Werror=redundant-decls.
2017-05-09 14:19:51 +01:00
Jonas Ådahl
31c72bd7df GdkWaylandWindow: Unexport when finalizing
The application might not have exported, and it'll be too late for it
at this point anyway, so lets be helpful and not leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-09 10:16:32 +08:00
Jonas Ådahl
64312d79f7 wayland: Remove self assignment
Don't assign the value of a variable to itself. It was added just for
clarity, but it makes coverity complain, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=780301
2017-05-08 17:51:41 -04:00
Jonas Ådahl
6f326a71d4 wayland: Use correct enum type and values
Use the gravity enum values when converting to gravity. It doesn't fix
anything, since the enum values were identical, but it makes a coverity
warning go away.

https://bugzilla.gnome.org/show_bug.cgi?id=780301
2017-05-08 17:51:30 -04:00
Matthias Clasen
7c66c68f48 Revert "GdkWaylandWindow: Unexport when finalizing"
This reverts commit ab4e4bd3ae.
2017-05-08 16:00:49 -04:00
Jonas Ådahl
ab4e4bd3ae GdkWaylandWindow: Unexport when finalizing
The application might not have exported, and it'll be too late for it
at this point anyway, so lets be helpful and not leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-08 15:47:12 -04:00
Jonas Ådahl
e016d9a5db GdkWaylandWindow: Clear export user data when used
It was only cleared when unexported, but we could just as well clear it
when its used too.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-08 15:47:12 -04:00
Olivier Fourdan
c770b5cbbc wayland: make key event log more explicit
With Wayland, GDK_DEBUG=events would log key events but not explicitly
state whether the event is a key press or release, or if it's
originating from a key repeat.

Add some more verbosity to make sure these informations are logged on
key delivery when GDK_DEBUG is set.

https://bugzilla.gnome.org/show_bug.cgi?id=781767
2017-04-28 13:08:37 +02:00
Florian Müllner
a866937d08 gdk: Relicense translate_wm_button_layout_to_gtk()
It is generally a good idea to license individual files under the
same terms as the project license (in particular when the mismatch
boils down to having copied the wrong license header), so relicense
the code under the LGPL.

https://bugzilla.gnome.org/show_bug.cgi?id=781422
2017-04-27 21:06:15 +02:00
Matthias Clasen
991e84fe3a Fix a typo 2017-04-21 18:27:43 -04:00
John Ralls
9b5a92f5cc Save Changes Bug 781118 - gtk 3.22.12 quartz backend segfault
Calling 'width' on an NSValue won't work, must call sizeValue on it.
2017-04-10 16:40:05 -07:00
William Hua
6e711beb0b mir: clean up an ugly function 2017-04-03 13:29:59 -04:00
Olivier Fourdan
efbe40214b gdkwindow: different displays, different classes
GdkWindow's before_process_all_updates() and after_process_all_updates()
wrongly assume that all displays are from the same class, which is not
the case if for example a client open different displays with different
backends such as X11 and Wayland.

Use the actual class for each display in the display list to avoid a
crash when mixing displays from different classes.

Fix suggested by Christian Persch <chpe@gnome.org> in bug #776472.

https://bugzilla.gnome.org/show_bug.cgi?id=776472
2017-04-03 19:16:10 +02:00
John Ralls
b6aaae7dea Replace NSScreen:userSpaceScaleFactor, deprecated since MacOS X 10.7.
userSpaceScaleFactor is not compatible with high-resolution (aka HiDPI)
displays.
2017-04-02 18:16:59 -07:00
John Ralls
8074626fc6 Add missing file and correct some warnings from quartz: Add monitor support. 2017-04-02 17:55:55 -07:00
Matthias Clasen
dbfa8e86c5 quartz: Add a forgotten file 2017-04-01 17:41:00 -04:00
Matthias Clasen
2ad14d393b quartz: Add monitor support
This is a backport of a patch by Tom Schoonjans,

https://bugzilla.gnome.org/show_bug.cgi?id=779184
2017-04-01 16:50:12 -04:00
William Hua
2f851530f4 mir: set application name when creating connection 2017-04-01 10:56:54 -04:00
William Hua
ecf9c06ada mir: remove keymap and input device state warnings 2017-03-31 23:18:06 -04:00
William Hua
01b7307296 mir: re-write settings implementation 2017-03-31 15:55:29 -04:00
Matthias Clasen
80a177db8b Avoid unused variable warnings 2017-03-26 15:05:37 +01:00
William Hua
ff1a78788f mir: always emit a resize when creating windows 2017-03-22 02:44:38 -04:00
Timm Bäder
e63748f231 GdkX11DeviceManager: Fix debugging output
The 2 values added in 3.22 were missing from the source_names array.
2017-03-20 20:45:11 +00:00
Christoph Reiter
64ec7c2640 quartz: fix build for <10.12
The style mask type was changed from NSUInteger to NSWindowStyleMask.
Use NSUInteger so it also works on older macOS.

https://bugzilla.gnome.org/show_bug.cgi?id=780019
2017-03-15 07:26:07 -04:00
William Hua
ad5d95e062 mir: start handling resize events again 2017-03-13 10:54:35 -04:00
William Hua
3be1bffc77 mir: remove unused generate_configure_event () 2017-03-13 04:09:48 -04:00
William Hua
16e36e5399 mir: set placement for menu-type windows 2017-03-13 03:52:14 -04:00
William Hua
f0e3781566 mir: synthesize resize events 2017-03-13 03:52:11 -04:00
William Hua
91f4b0c31f mir: ignore resize events 2017-03-13 03:52:09 -04:00
William Hua
05a060c6a6 mir: try mir before x11 2017-03-13 03:52:06 -04:00
Matthias Clasen
6a02bd4fa9 quartz: Fix another typo 2017-03-10 07:27:12 -05:00
Matthias Clasen
9caa50ca0d quartz: Fix the build
A ; was left out inadvertently.
2017-03-10 07:10:26 -05:00
William Hua
b4df881542 mir: log additional event types 2017-03-10 00:30:38 -05:00
William Hua
e63d4111a4 mir: don't create GDK_INPUT_ONLY windows 2017-03-06 13:12:22 -05:00
Matthias Clasen
7160e3a12f Quartz: Implement gdk_window_set_functions
This is useful, and easy to implement.
2017-03-05 22:53:03 -05:00
Matthias Clasen
cf1e2b9042 Convince OS X to fully fullscreen windows
We typically want to have the full screen given to
the content, not the aspect-ratio preserving behavior
that newer OS X has.

https://bugzilla.gnome.org/show_bug.cgi?id=779383
2017-03-02 08:12:37 -05:00
William Hua
6f3d1e1046 mir: deprecate gdk_mir_window_get_mir_surface () 2017-03-01 15:31:54 -05:00