Commit Graph

5759 Commits

Author SHA1 Message Date
Matthias Clasen
5d7c79574b Use Adwaita on Windows too
Having the same, usable, default appearance acroll platforms
trumps having a more-or-less working native theme. The default
will be Adwaita on all platforms. The native ms-windows theme
is of course still available.
2014-06-13 16:49:59 -04:00
Sjoerd Simons
5b118a9fd7 wayland: Ensure the touch sequence pointer value is non-null
Weston numbers its touch sequences ids starting from 0, thus simply
setting the GtkEvents touch.sequence to the touch id value typically
causes gdk_event_get_event_sequence to return NULL. Unfortunately this
confuses other parts of GDK.

As both weston & mutter keep the sequence id between 0..max_dev_touches
-1 simply use + 1 to keep the id > 0. While this isn't entirely correct
(compositor could send -1 as the touch id), this keeps the touch id in
gtk tied to the touch id from weston which is useful for debugging. A
more thorough solution could be done when it turns out this is an issue
in practise

https://bugzilla.gnome.org/show_bug.cgi?id=731371
2014-06-12 12:35:23 +02:00
Matthias Clasen
5334fb8921 Drop GDK_MULTIHEAD_SAFE
We don't support multiple screens anymore, so there is no need
for marking API as multihead safe any longer.
2014-06-11 21:55:15 -04:00
Robert Ancell
b95a6c7c62 GdkDisplay: Remove unused GdkKeyboardGrabInfo struct
I can't find anything that uses this struct and it seems to be replaced by GdkDeviceGrabInfo
2014-06-11 08:30:04 +12:00
Matthias Clasen
92e30dadc2 GdkOffscreenWindow: Fill in a few more vfuncs
Mostly to avoid special cases in testcases.
2014-06-09 13:31:03 -04:00
Matthias Clasen
5727a86760 GdkDevice: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:53 -04:00
Florian Müllner
add67b516c wayland: Explicitly handle classic mode for now
There are plans to add session-dependent defaults to GSettings
(based on the newly standardized XDG_CURRENT_DESKTOP); until
then, the WM uses a different schema for its button-layout
setting in classic mode. So for the time being, do the same
and pick the alternative schema when XDG_CURRENT_DESKTOP
indicates that we are in a classic session.
(It's not pretty, but hopefully won't be with us for too long ...)

https://bugzilla.gnome.org/show_bug.cgi?id=731273
2014-06-06 15:32:59 +02:00
Florian Müllner
f4c963ef74 wayland: Set gtk-decoration-layout
Pick up the setting from the org.gnome.desktop.wm.preferences schema
if available. It is slightly more involved than other settings, as
the actual button names used in the schema differ from the ones we
use, so we need an additional translation step.

https://bugzilla.gnome.org/show_bug.cgi?id=731273
2014-06-06 15:32:59 +02:00
Chun-wei Fan
dd4bc9fd09 gdk/Makefile.am: Fix MSVC Project Generation
We need to account for the sources that moved to gdk/deprecated/, so the
slashes must be converted here.
2014-06-03 17:00:02 +08:00
Kristian Høgsberg
6cd26e0939 wayland: Use event->key.time for setting key event time
We were using event->button.time before. That works because it's part of
the common event header, but it's wrong.
2014-05-27 10:24:34 -07:00
Kristian Høgsberg
544e1ac1d1 wayland: Remove unused XSERVER_TIME_IS_LATER macro 2014-05-27 10:24:34 -07:00
Jasper St. Pierre
0d402601b2 wayland: Add support for show_window_menu 2014-05-24 15:55:55 -04:00
Carlos Garnacho
0d4e75f078 gdk: Make GdkEventSequence a boxed type
Not much to copy nor free, but this'll make bindings happy
2014-05-23 19:54:33 +02:00
Carlos Garnacho
a6526eb820 gdk: Lookup both device and global cursor when checking up the hierarchy
When the pointer cursor is updated on CSW, lookup for either a device
cursor, or a global one. It would previously lookup for windows with
a global cursor, and then check if it had a device cursor, which would
skip windows with only device cursors set, and unexpectedly set the
global cursor.
2014-05-23 19:54:31 +02:00
Jasper St. Pierre
65022c4078 gdkwindow-x11: Rearrange a tiny bit 2014-05-22 15:01:36 -04:00
Jasper St. Pierre
0d3f162d6b gdkwindow-x11: Fix build 2014-05-22 15:01:23 -04:00
Jasper St. Pierre
084576f214 gdkwindow-x11: Ungrab the implicit grab before showing the window menu
Otherwise, the WM cannot take a grab on the pointer device, since we'll
still have the implicit grab.
2014-05-22 14:47:55 -04:00
Jasper St. Pierre
6c3712599c gdkwindow-x11: Pass through the x/y coordinates to _GTK_SHOW_WINDOW_MENU
We accept these now.
2014-05-22 11:17:33 -04:00
Matthias Clasen
3b1196fc68 Forgotten file 2014-05-22 09:31:15 -04:00
Matthias Clasen
49cf5142ba Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
2014-05-22 09:09:55 -04:00
Matthias Clasen
3d2dcc2bfe Small typo fixes
We generally talk about the 'windowing system' in the GDK frontend
docs, not the 'window manager'.
2014-05-21 19:01:37 -04:00
Jasper St. Pierre
0ea1a526f9 gtkwindow: Use window-manager-side window menus
This avoids a bunch of policy problems with deciding how to lay
out the window menu under different WMs.

For now, we use the special event _GTK_SHOW_WINDOW_MENU, but we
hope to have this standardized in wm-spec quite soon, as KDE wants
it as well.
2014-05-21 18:41:07 -04:00
Evan Nemerson
701adf81b6 gdk: assorted introspection and documentation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=729983
2014-05-19 11:47:59 -07:00
Jasper St. Pierre
8c15389d76 wayland: Clean up init code a tiny bit 2014-05-16 15:35:47 -04:00
Jasper St. Pierre
ffebedae40 wayland: Simplify roundtrip initialization
All the globals we care about should appear before doing anything
else, up-front, so a single round-trip after adding the registry
should be more than enough.
2014-05-16 15:35:29 -04:00
Jasper St. Pierre
72e9937e00 wayland: Remove unused stuff 2014-05-16 15:24:37 -04:00
Chun-wei Fan
58b48fa209 gdkselection-win32.c: Declare Variables At Top Of Block
...so that builds on Visual C++ can be fixed.
2014-05-16 12:25:36 +08:00
Jasper St. Pierre
75ecdf50a3 wayland: Fix GtkMenuButton popups in a terrible, hacky way
Since you can't take grabs on unmapped windows, GtkMenu takes a grab on
the menu in a convoluted way: it first grabs another window, shows the
menu window, and then transfers the grab over to the GtkMenu widget.

For normal menubars, this is perfectly fine, as the first window it grabs
is our toplevel, and that gets picked up in our transient path.  For
GtkMenuButton or other spurious uses of gtk_menu_popup, it creates a new
temporary input-only window which it takes the grab on, known as the "grab
transfer window". Since this window isn't a transient-for of our new menu
widget window, the grab isn't noticed when we go to show it, and thus the
menu ends up as a new toplevel.

Add a special hack to GtkMenu and the Wayland backend which lets us notice
this "grab transfer window", and include it in our grab finding path.

It's sort of terrible to have to hack up the widgets instead of just the
backend, but the alternative would be an entirely new window type which is
managed correctly by GDK. I don't want to write that.
2014-05-15 18:02:45 -04:00
Jasper St. Pierre
f6b3f0bfc7 wayland: Clean up function to find the input seat 2014-05-15 18:02:45 -04:00
Jasper St. Pierre
7052795a80 wayland: Clean up code to find the correct seat for a window 2014-05-15 18:02:45 -04:00
Jasper St. Pierre
38445e6326 wayland: Ack the configure immediately 2014-05-13 16:21:57 -04:00
Jasper St. Pierre
9b4668c82c wayland: Update to latest xdg-shell protocol 2014-05-13 02:39:59 -04:00
Jasper St. Pierre
c1efc4ad7b gdk: Add new _gdk_set_window_state
Wayland's mechanism tells us all of our new states, rather than
telling us which ones were added and removed. Add a new private
interface so that we can simply specify the new states as a
bitfield directly rather than having to compute which ones were
added and removed.
2014-05-13 02:39:59 -04:00
Evan Nemerson
38d2458f53 gdk: add many missing (nullable) return value annotations
https://bugzilla.gnome.org/show_bug.cgi?id=729834
2014-05-11 11:48:32 -04:00
David Mansfield
00275dfc9f GdkCursor: Don't leak a cairo surface
The function gdk_cursor_new_from_pixbuf creates a cairo surface
to pass to its backend implementation, but doesn't destroy it
afterwards.
https://bugzilla.gnome.org/show_bug.cgi?id=729670
2014-05-07 19:29:56 -04:00
Carlos Garnacho
ac5993a7e7 wayland: Fix c&p typo in touch capabilities handling. 2014-05-06 18:37:57 +02:00
Matthias Clasen
f66e239fe4 Drop unneeded deprecation suppression
Removing this did not produce any deprecation warnings.
2014-05-02 18:50:52 -04:00
Carlos Garnacho
8e5982ca9d gdkwindow: ignore shape on client-side windows when recomputing visible regions
Rendering doesn't do much about clipping drawing operations to the window shape,
although invalidation applies the shape to every window, leaving possibly trails
of "overrendered" content. So ensure the shape portions get invalidated too when
the window is moved/resized.

https://bugzilla.gnome.org/show_bug.cgi?id=729095
2014-04-28 22:44:59 +02:00
Adel Gadllah
b395929a16 gdkscreen-wayland: Emit monitors-changed when the output scale changes
https://bugzilla.gnome.org/show_bug.cgi?id=729013
2014-04-26 17:32:57 +02:00
Marc-André Lureau
4480bf382a gdk/win32: VK_SNAPSHOT maps to GDK_Print
Also, I am not sure the above VK_PRINT -> GDK_Print mapping is
correct, but it doesn't hurt yet.

https://bugzilla.gnome.org/show_bug.cgi?id=686170
2014-04-24 16:31:09 +02:00
Marc-André Lureau
2230fea0b6 win32: add more clipboard data checks to avoid crash
It may happen that the received clipboard data is empty, but
if it's of type image/bmp, gtk+ will crash:

gdk_property_change: 00030AD4 GDK_SELECTION image/bmp REPLACE 8*0 bits:
... delayed rendering
gdk_selection_send_notify_for_display: 00030AD4 CLIPBOARD image/bmp
GDK_SELECTION (no-op)
_gdk_win32_selection_convert_to_dib: 1252003C image/bmp

Program received signal SIGSEGV, Segmentation fault.
0x749a9f40 in msvcrt!memmove () from C:\Windows\syswow64\msvcrt.dll

Thread 1 (Thread 2248.0x1b34):
target=0xc07b) at gdkselection-win32.c:1292
at gdkevents-win32.c:3498
wparam=8, lparam=0) at gdkevents-win32.c:232
message=773, wparam=8, lparam=0)
    at gdkevents-win32.c:263
C:\Windows\syswow64\user32.dll
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll
wparam=0, lparam=-1687549457)
    at gdkevents-win32.c:248
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll

https://bugzilla.gnome.org/show_bug.cgi?id=728745
2014-04-24 16:12:07 +02:00
Matthias Clasen
ea61bdf1a0 Add GDK_VERSION_3_14
https://bugzilla.gnome.org/show_bug.cgi?id=728814
2014-04-23 23:25:07 -04:00
Carlos Garnacho
1a2a5a44bd wayland: handle the wl_touch interface
The events are routed through a new slave device with type
GDK_SOURCE_TOUCHSCREEN, minimal tracking of touches is done
to keep the state for each of those.

https://bugzilla.gnome.org/show_bug.cgi?id=728426
2014-04-22 23:54:43 -04:00
Carlos Garnacho
af8d6e6549 wayland: Separate master devices from seat capabilities
The master pointer/keyboard pair should never disappear or be
inconsistent. The seat capabilities are now reflected through
slave devices, those may come and go freely as the seat
capabilities change. This also enables adding further capabilities
to handle eg. touch.

https://bugzilla.gnome.org/show_bug.cgi?id=728426
2014-04-22 23:50:55 -04:00
Jasper St. Pierre
ee3d00c391 wayland: Map the window immediately on show 2014-04-22 19:19:14 -04:00
Jasper St. Pierre
4e72674bf3 wayland: Remove useless hint set 2014-04-22 19:19:14 -04:00
Jasper St. Pierre
938725fff0 wayland: Remove VISIBILITY_NOTIFY event
VISIBILITY_NOTIFY is already known to be unreliable.
2014-04-22 19:19:14 -04:00
Antoine Jacoutot
be9d1e0b3b broadway backend: allow building on OpenBSD
On OpenBSD shm_open(3) is part of libc and there is not librt, so add an
according check.
Check if we have posix_fallocate before using it.

https://bugzilla.gnome.org/show_bug.cgi?id=728272
2014-04-18 18:20:34 +02:00
Jasper St. Pierre
e4e75a94f5 wayland: The xdg_surface.delete event was renamed to close 2014-04-17 13:14:44 -04:00
Руслан Ижбулатов
42ee237691 W32: correctly guess max window size from the size of the workarea of the screen it's on
Get monitor on which the most of the window is located (nearest monitor if
window is not on screen), get its work area (area not occupied by taskbar or
any other bars) and use that for maxsize.

Previous default of 30000 meant that windows maximized onto full screen,
even covering the area where taskbar is.

https://bugzilla.gnome.org/show_bug.cgi?id=726592
2014-04-16 22:39:56 +00:00