Commit Graph

6249 Commits

Author SHA1 Message Date
Jose Rostagno
216e982603 drop old compat code, BITMAPV5HEADER is defined on vista+
https://bugzilla.gnome.org/show_bug.cgi?id=748156
2015-04-27 06:40:43 -04:00
Jose Rostagno
dcd5368252 WM_CLIPBOARDUPDATE is always define on vista+
https://msdn.microsoft.com/en-us/library/windows/desktop/ms649021%28v=vs.85%29.aspx

https://bugzilla.gnome.org/show_bug.cgi?id=748156
2015-04-27 06:40:43 -04:00
Jose Rostagno
bc1ac40d2a Simplify code a bit after xp support drop
https://bugzilla.gnome.org/show_bug.cgi?id=748156
2015-04-27 06:40:43 -04:00
Christian Hergert
b44afa1d48 gdk: don't segfault on beep with offscreen window
https://bugzilla.gnome.org/show_bug.cgi?id=748341
2015-04-27 06:26:52 -04:00
Jonas Ådahl
3da7394b58 wayland: Add support for gtk_window_set_modal
Add two new requests to the gtk_surface interface: set_modal and
unset_modal. The server will currently not do anything special with
input focus, and its up to the client to ignore events on the parent
surface.

This commit bumps the gtk_shell interface version to 2. By connecting to
a Wayland server with another gtk_shell interface version any features
depending on the gtk_shell protocol will not be available.

https://bugzilla.gnome.org/show_bug.cgi?id=745721
2015-04-23 16:09:15 +08:00
Kjell Ahlstedt
2495edc9fd GtkPopover:pointing-to: GdkRectangle instead of cairo_rectangle_int_t
cairo_rectangle_int_t was replaced by GdkRectangle in commit
552c29b488, but the type of the pointing-to
property was not changed.

To avoid breaking old code that sets or gets the property with a GValue
of type CAIRO_GOBJECT_TYPE_RECTANGLE_INT, transformation functions between
CAIRO_GOBJECT_TYPE_RECTANGLE_INT and GDK_TYPE_RECTANGLE are registered on
the first call to gdk_rectangle_get_type().

https://bugzilla.gnome.org/show_bug.cgi?id=723394
2015-04-21 09:05:26 +02:00
Matthias Clasen
5a643f19c5 Improve the docs for gdk_window_set_opaque_region
Fix several typos and annotate the region parameter
as allow-none.
2015-04-18 12:54:45 -04:00
Carlos Garnacho
3a3f2e505a wayland: Don't unset the selected mimetype on drop_reply
gdk_wayland_drop_context_set_status() can't do much else currently besides
picking a mimetype (the first one is currently chosen). This may incorrectly
unset the mimetype chosen on .receive(), so the transfer is cancelled before
it even starts.

At the time drop_reply happens, we should have already picked a mimetype
along the way, so only cover for accepted=FALSE in order to unset it.
2015-04-18 18:11:27 +02:00
Carlos Garnacho
42f096c846 wayland: Plug leak
We leak refs on the dest window if it gets set multiple times, expected to
happen as the DnD operation moves across the window.
2015-04-18 18:11:27 +02:00
Carlos Garnacho
0edc9deee5 wayland: Create internal GdkWindow to be set as the DnD source
During drag operations from another client, we currently set no window as
the DnD source. There's paths in upper layers though that rely on it being
set, just that we don't trigger these yet.
2015-04-18 18:11:26 +02:00
Federico Mena Quintero
9769e75a45 gdkcolor.h: Use GDK_DEPRECATED_IN_3_14_FOR() throughout
So that lazy people like me can see in the header file which new functions to use.
2015-04-17 11:16:30 -05:00
Руслан Ижбулатов
c0e0a1508b W32: Support horizontal mouse wheel scrolling
https://bugzilla.gnome.org/show_bug.cgi?id=748014
2015-04-17 04:38:34 +00:00
Chun-wei Fan
bbac0eb3b9 gdk-win32: Clean Up A Bit
As GLib dropped Windows 2000 support some time ago [1][2], and the current
git master already depends on a GLib release that is well after it dropped
Windows 2000 support, clean up the code a bit as we are assured that the
code will run on XP and later, plus, we have dropped XP support during
this cycle with commit b85f0cc.

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

[1]: https://git.gnome.org/browse/glib/commit/?id=80c24d36f2525d83e458ebbdf62fdbd085945a02
[2]: https://git.gnome.org/browse/glib/commit/?id=731b46990896665a8107535080bb075a6e18b6f7
2015-04-17 11:32:16 +08:00
Chun-wei Fan
c6a8ead931 Revert "gdk-win32: Clean Up A Bit"
This reverts commit 24d3f3fcb2.

Sorry, I am going to re-commit this very shortly with a new
commit message, as I found the commit message to be quite
wrong and misleading.
2015-04-17 11:29:07 +08:00
Chun-wei Fan
b85f0ccc67 gdk-win32: Really Implement GdkScreen->is_composited()
The current GdkScreen->is_composited() is a stub as we were having Windows
XP being supported, which does not support Desktop Window Manager (DWM),
which is used by Windows for composition.

Windows Vista and later support DWM, and it is always enabled on Windows 8/
Server 2012 and later.

Please note that as we are dropping XP support in this cycle, this is the
commit that would say goodbye to Windows XP support for GTK+-3.x, by
linking directly to dwmapi.dll.  This means, we only check whether we are
on Windows 8 or Server 2012 (or later) to see whether we unconditionally
have composition enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=741849
2015-04-17 11:23:53 +08:00
Chun-wei Fan
24d3f3fcb2 gdk-win32: Clean Up A Bit
As GLib dropped XP support some time ago [1][2], and the current git master already
depends on a GLib release that is well after it dropped XP support, clean
up the code a bit as we are assured that the code will run on XP and later,
plus, we are dropping XP support during this cycle (i.e. very soon).

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

[1]: https://git.gnome.org/browse/glib/commit/?id=80c24d36f2525d83e458ebbdf62fdbd085945a02
[2]: https://git.gnome.org/browse/glib/commit/?id=731b46990896665a8107535080bb075a6e18b6f7
2015-04-17 11:23:39 +08:00
Evangelos Foutras
374bedc0e2 x11: Relax requirements for setting ParentRelative
XSetWindowBackgroundPixmap() will throw BadMatch only in the case of a
different parent window depth. Different visuals are fine and actually
expected in Gtk+ 3.16 (since we don't stick to the system default visual
but try to pick a better one).

https://bugzilla.gnome.org/show_bug.cgi?id=747524
2015-04-13 08:26:15 -04:00
Matthias Clasen
b2e19866ea wayland: Wait for output and seat information
When we open the connection, we get the wl_output object,
but we return before all the information such as monitor
geometry has arrived, which causes us to misinform early
users of this information. Do a roundtrip here that causes
us to wait until the information is complete. Do the same
for seats, just in case.
https://bugzilla.gnome.org/show_bug.cgi?id=747471
2015-04-09 00:14:20 -04:00
Matthias Clasen
da16947e21 wayland: Add more debug output 2015-04-09 00:13:37 -04:00
William Hua
61f3399f98 mir: Fix build failure due to changed API
mir_surface_set_event_handler() now takes three arguments.
2015-04-07 10:38:22 -04:00
Matthias Clasen
cb750f60f9 wayland: Don't mix free and g_strdup
While it works most of the time, this is technically
not correct.
2015-04-05 18:59:51 -04:00
Olivier Fourdan
49ec67c7eb x11/gl: Fix use after free
https://bugzilla.gnome.org/show_bug.cgi?id=747305

Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
2015-04-05 07:41:03 -04:00
Jonas Ådahl
71256a0f94 wayland: Set a more correct xdg_surface application id
The "app_id" of a xdg_surface should be the ID that can potentially be
used to get the DBUS name or the .desktop file.

For GtkApplication programs this is often the ID passed when creating the
GtkApplication object, so when available lets use that.

As fallbacks, first try g_get_prgname as it often corresponds to the
basename part of the .dektop file for non-GtkApplication programs.
Otherwise use gdk_get_program_class, even though that string usually
doesn't conform to the expectations of xdg_surface.set_application_id.

https://bugzilla.gnome.org/show_bug.cgi?id=746435
2015-03-31 12:37:50 +08:00
Emmanuele Bassi
d79bc00345 x11/gl: Do not use GLX_EXT_texture_from_pixmap if not available
If the GLX_EXT_texture_from_pixmap extension is not available when we
did the extensions check, then there's no point in using the backend
specific code paths that rely on it.
2015-03-26 17:28:48 +00:00
Руслан Ижбулатов
3c80451b17 W32: Only override window miximized position for CSDed windows
This fixes an issue with non-CSDed windows being improperly positioned
when maximized, which was introduced by the previous commit.

https://bugzilla.gnome.org/show_bug.cgi?id=746821
2015-03-26 17:02:38 +00:00
Руслан Ижбулатов
af9f6fca5f W32: Correctly set maximized window position
Use screen workarea to *also* set the position of a maximized window,
not just its size. Without this the window position defaults to 0:0
(the topleft corner), which is wrong when taskbar is position along the
top or left edge of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=746821
2015-03-26 15:43:17 +00:00
Emmanuele Bassi
85141bc503 x11/gl: Do not try to call MakeCurrent with a NULL context
This should not happen, but better safe than sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=746746
2015-03-25 15:18:44 +00:00
Emmanuele Bassi
b899a78387 x11/gl: Trap GL context creation
Avoid an X11 error in case the context creation fails, so we can avoid a
crash and pick it up in the upper layers, and display an error.

https://bugzilla.gnome.org/show_bug.cgi?id=746746
2015-03-25 14:34:42 +00:00
Niels Nesse
641e280311 x11/gl: Removing some more legacy GL calls
They are not required any more.

http://bugzilla.gnome.org/show_bug.cgi?id=746668
2015-03-23 22:16:34 +00:00
Emmanuele Bassi
6bd7526ee7 x11/gl: Do not call glEnable/glDisable with GL_TEXTURE_2D
These are fixed pipeline functions, and Mesa will warn (if debugging
messages are enabled). At best, they are poinless calls.
2015-03-23 22:03:00 +00:00
Matthias Clasen
fbbb3d1816 Fix some clang warnings
It complains about double const, and it is right.
2015-03-22 14:40:57 -04:00
Matthias Clasen
c16acff3ea Start 3.17 development
Bump the version to 3.17.0 and add version macros.
2015-03-22 02:10:23 -04:00
Rico Tzschichholz
db8e6aa497 mir: Fix version annotation, the mir-backend is available since 3.16 2015-03-20 20:23:01 +01:00
Carlos Garnacho
6c8c37abbb wayland: Silence warnings on clipboard data sending cancellation
During copy/paste, it may be common that we receive several property changes
around the selection atom, this results in warnings when cancelling the previous
write attempt. We already honor the last request properly, so we should just
cancel silently.
2015-03-19 16:05:04 +01:00
Carlos Garnacho
d5160bb950 wayland: Ensure we re-request the target if the fd changes
If we receive wl_data_source.target before .send, the target would already
be cached, but we'd take no action on the new fd.
2015-03-19 16:05:04 +01:00
Carlos Garnacho
a59fd4a9ad wayland: Don't accept the "TARGETS" target on the wl_data_offer
This is handled separately through the data already cached from the
wl_data_offer.offer handler, we can avoid this request entirely then.
2015-03-19 16:05:04 +01:00
Carlos Garnacho
dcfa55ac7e wayland: Fix thinko in wl_data_source.cancelled handler
The wl_data_source may be the clipboard's. Looking up the drag context in
order to get the display isn't going to fare well there. So, just use the
default display, and only look up the drag context when we know we need it.

https://bugzilla.gnome.org/show_bug.cgi?id=746386
2015-03-18 11:21:40 +01:00
Jonas Ådahl
4e930ada32 wayland: Move gtk-shell compatibility version define too
https://bugzilla.gnome.org/show_bug.cgi?id=745721
2015-03-16 13:58:14 -04:00
Jonas Ådahl
225c10bc5a wayland: Don't set the wl_surface user_data twice
wl_surface_add_listener already sets the user data pointer, so no need
to do it separately before.

https://bugzilla.gnome.org/show_bug.cgi?id=746141
2015-03-16 19:53:37 +08:00
Jonas Ådahl
7372ddd2a1 wayland: Ignore setting the same cursor theme as was already set
If the name and size of the theme is identical to the current
configuration, do nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=746141
2015-03-16 19:53:37 +08:00
Jonas Ådahl
465647e964 wayland: Support scaling of theme based cursors
Support scaling of cursors created from themes. The default scale is
always 1, but if the pointer cursor surface enters an output with a
higher scale, load the larger version of the cursor theme and use the
image from that theme.

This assumes the theme size is set to one that fits with an output scale
= 1.

https://bugzilla.gnome.org/show_bug.cgi?id=746141
2015-03-16 19:53:37 +08:00
Jonas Ådahl
7b2cdabc2e wayland: Put interface version defines in a common place
So far only one, but put it somewhere all files can see it.

https://bugzilla.gnome.org/show_bug.cgi?id=746141
2015-03-16 19:53:37 +08:00
Jonas Ådahl
c7be8fd398 wayland: Don't set cursor surface scale when we don't have a surface
The setting of the the surface scale even when the surface is not
created from a surface was introduced due to a crash when getting the
buffers when dividing by the scale. The only reason I can see this is
that we get the buffer from a non-existing surface when the wl_cursor
has not yet been set.

Instead, use the name field to avoid trying to use the non-existing
surface, effectively avoiding the division-by-zero that way.

https://bugzilla.gnome.org/show_bug.cgi?id=746141
2015-03-16 19:53:37 +08:00
Jonas Ådahl
b4344861a0 wayland: Only bind to supported gtk-shell versions
The gtk-shell Wayland protocol extension is not meant to be backward
compatible right now, so avoid binding to any version that is not the
one supported.

https://bugzilla.gnome.org/show_bug.cgi?id=745721
2015-03-11 11:37:37 +08:00
Philip Withnall
586240d2f8 gdkwindow: Fix potential NULL pointer dereference
gdk_window_ensure_native() can end up with a NULL parent pointer, which
it passes to find_native_parent_above()…but that expects a non-NULL
parent.

Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-09 13:41:37 +00:00
Eric Le Bihan
8ecc51ad8a Fix undefined reference to get_xkb()
When configuring Gtk+ with --disable-xkb, the build fails because of an
undefined reference to get_xkb().

This patch fixes this issue.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

https://bugzilla.gnome.org/show_bug.cgi?id=739070
2015-03-07 18:42:27 -05:00
Niels Nesse
b87715973f gl: Warn the user if they request a GL context version less than 3.2
If the user requests a version less than 3.2 the version is forced to 3.2.
Previous checking code have an inconsistent behavior depending on which
minor version number was specified. This is avoided now by temporarily
converting the major/minor pair into a single integer.

https://bugzilla.gnome.org/show_bug.cgi?id=744288
2015-03-06 14:02:55 +01:00
Carlos Garnacho
4cae9bdd05 x11: Store last axes from device
And use these for the missing axes if the valuator mask is incomplete.
This used to work fine on tablets because the Wacom driver ensures all
valuators are sent, which is not true if using the evdev driver.

https://bugzilla.gnome.org/show_bug.cgi?id=703610
2015-03-02 18:57:04 +01:00
Carlos Garnacho
eaebc2cb4b wayland: Delay wl_subsurface interface creation until the window is shown
It isn't really necessary anytime before, so just make sure it's there only
when the window is visible.

https://bugzilla.gnome.org/show_bug.cgi?id=743427
2015-03-02 12:11:59 +01:00
Carlos Garnacho
c55fcd35fe wayland: Thaw the clock if we hide a GdkWindow mid-frame
When a window is hidden, its surface and all its roles are destroyed,
if this happens when we already issued a wl_surface_commit and are
awaiting for a frame callback, the clock will remain frozen for the
next time the window is shown.

To avoid this, keep track of the wl_surface_frame() calls issued,
and ensure the clock is thawed after hiding. If we happen to receive
the frame callback, it is just ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=743427
2015-03-02 12:11:59 +01:00