Commit Graph

5747 Commits

Author SHA1 Message Date
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
Jasper St. Pierre
5ac2346862 Remove gdk_synthesize_window_state from gdkinternals.h
It's already in gdkprivate.h
2014-04-12 08:20:33 -07:00
Jasper St. Pierre
eb5cc3da9b wayland: set_transient_for was renamed to set_parent 2014-04-12 08:20:33 -07:00
Jasper St. Pierre
e91e447db7 wayland: Don't pass dx/dy when we're resizing
They're ignored by the server.
2014-04-12 08:20:33 -07:00
Jasper St. Pierre
8201e2bfab wayland: Merge buffer implementations 2014-04-12 08:20:33 -07:00
Руслан Ижбулатов
b1012256f2 Revert "W32: RGBA GDK backend (broken)"
This reverts commit f89d38bc2d.

Pushed by accident.
2014-04-10 17:59:48 +00:00
Руслан Ижбулатов
fee41fb616 Revert "W32: Implement composition check for GDK"
This reverts commit 7ae5a56948.

Pushed by accident.
2014-04-10 17:58:58 +00:00
Руслан Ижбулатов
7ae5a56948 W32: Implement composition check for GDK
Also move DWM function grabbing and make those functions available to all of GDK-Win32.

https://bugzilla.gnome.org/show_bug.cgi?id=727316
2014-04-10 17:49:20 +00:00
Руслан Ижбулатов
f89d38bc2d W32: RGBA GDK backend (broken)
https://bugzilla.gnome.org/show_bug.cgi?id=727316
2014-04-10 17:49:19 +00:00
Matthias Clasen
d6cc9bd7cb Add version macros for 3.14 2014-04-06 01:27:01 -04:00
Matthias Clasen
98ae6fd746 docs: More uniform formatting
Make all occurrences of hex in gdkcolor.c use “.
2014-04-04 01:25:14 -04:00
Volker Sobek
f8b6bfe744 docs: Remove '\' escape character from literals
commit 7f6a964c47 replaced entities, but
escaped the replacement text also inside literals, which resulted in the
escaping '\' to also appear in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727322
2014-04-04 01:24:35 -04:00
Руслан Ижбулатов
0d53a581b4 Give CC to instrospection scanner
Introspection scanner-generation script gets compiler from the CC
environment, we need to set it.

https://bugzilla.gnome.org/show_bug.cgi?id=722817
2014-04-01 11:50:35 +00:00