Commit Graph

5865 Commits

Author SHA1 Message Date
Jasper St. Pierre
87e2a7d4b2 gdkwindow-wayland: Destroy the wl_surface too when hiding a window
wl_surfaces can't switch roles, so destroying the xdg_surface but not
the wl_surface means that we could get an error when trying to re-map
the surface.

We could fix this by not destroying the xdg resource and only do it at
finalization time, but it's just as easy to just create a new wl_surface.
2014-06-19 15:10:54 -04:00
Jasper St. Pierre
6926c6d9f8 gdkwindow-wayland: Destroy the xdg roles before the wl_surface
Since the xdg roles are a special case of the surface, some compositors
like Weston destroy them automatically when the wl_surface is destroyed.
Thus, we need to destroy these first.
2014-06-19 15:10:54 -04:00
Jasper St. Pierre
b35820fa3c gdkwindow-wayland: Add a forgotten ref 2014-06-19 14:56:17 -04:00
Jasper St. Pierre
0bbe2589f6 gdkwindow-wayland: Another slight rearrange 2014-06-19 14:56:17 -04:00
Jasper St. Pierre
ec7504fd57 gdkwindow-wayland: Pair a ref with its owner 2014-06-19 14:56:17 -04:00
Jasper St. Pierre
12fc77ad98 gdkwindow-wayland: Don't post CONFIGURE events for the same size
The Wayland compositor is completely allowed to send us configure
events for the same size, and this validly happens if we're changing
states. Fizzle these out.
2014-06-19 14:56:16 -04:00
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
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
Руслан Ижбулатов
4b80aa1c05 Introspection for gdk-win32
https://bugzilla.gnome.org/show_bug.cgi?id=722817
2014-04-01 11:24:39 +00:00
Matthias Clasen
bf8a169cb9 docs: Another round of markup removal 2014-03-29 00:24:15 -04:00
Matthias Clasen
28377d4ffb Docs: remove some leftover markup 2014-03-28 23:51:52 -04:00
Chun-wei Fan
9e686d1fb5 gdkproperty-win32.c: Fix gtk-font-name handling
...on Windows 8+ and when the system setting for non-Unicode programs do
not match the language version of Windows by falling back to using Pango.

This ensures that the correct font is used during these scenarios, so that
we minimize the risk of seeing garbled characters for texts that the system
code page does not support due to system peculiarties.  There might be a
way to support gtk-font-name handling using the native Windows APIs
directly on Windows 8+, but that needs to be investigated.

https://bugzilla.gnome.org/show_bug.cgi?id=726298
2014-03-28 21:06:14 +08:00
Bastien Nocera
f71f7215ab all: Name more idles and timeouts
Following up from 438cd857c4,
name more timeouts and idles.

The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).

https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
Matthias Clasen
6cc0130147 wayland: Mark ourselves as not supporting compositing
The compositing that is meant here is really specific to the
X11 Composite extension, and does not apply to Wayland.

This is very rarely used functionality anyway, and none of
the other backends support it.
2014-03-24 12:49:32 -04:00
Matthias Clasen
a8036a5143 wayland: Fix northeast resizing
Surprisingly, the same corner that was broken for resizing under
X is also broken under Wayland, for an entirely different reason.
2014-03-21 18:24:38 -04:00
Pierre-Eric Pelloux-Prayer
ad39298f6d broadway: make sure color/delta run length do not overflow
Fixes bug 723045.
2014-03-21 21:45:04 +01:00
Jasper St. Pierre
084859d150 wayland: Mark ourselves as not supporting bounding shapes
Theoretically, we apply the shape mask client-side ourselves
with an ARGB32 pixmap and intersect it to get a union shape,
but I don't particularly care enough to write that code.

Realistic application code using bounding shapes in 2014 is
quite rare.
2014-03-20 14:28:25 -04:00
Jasper St. Pierre
3472235232 wayland: Add support for input regions 2014-03-20 14:28:24 -04:00
Jasper St. Pierre
385b55f203 wayland: Refactor how opaque region is handled
Move to a sync system just like the rest of the properties.
2014-03-20 14:28:24 -04:00
Matthias Clasen
36b3b9cbeb x11: Allow unmaximizing from tiled state too
This lets us unmaximize a half-tiled csd window on a touch system.
2014-03-17 18:18:53 -04:00
Jasper St. Pierre
16b5504eb9 wayland: Remove cruft in set_keep_above / set_keep_below
It's been decided: these will most likely never be supported on
Wayland, so remove the "stub" implementation of them.
2014-03-17 15:51:46 -04:00
Jasper St. Pierre
4eb7dac75b wayland: Fix get_frame_extents
We need to traverse up the hierarchy for windows here. Just use
our existing helper method for this.
2014-03-17 15:51:46 -04:00
Jasper St. Pierre
efdd68b3b0 Implement get_root_origin generically for all backends
It seems that some backends implemented get_root_origin wrong
and returned the client window coordinates, not the frame window
coordinates. Since it's possible to implement generically for all
windows, let's do that instead of having a separate impl vfunc.
2014-03-17 15:51:46 -04:00
Jasper St. Pierre
0320c3be8e wayland: Fix "fake root" coords
We were incorrectly summing up our own window over and over
rather than the coordinates of the parent windows.
2014-03-17 15:36:41 -04:00
Jasper St. Pierre
494e253e47 wayland: Add a giant doc comment explaining "fake root" coordinate space 2014-03-17 15:36:41 -04:00
Jasper St. Pierre
92833a0b82 wayland: Properly apply the fake root offset to event coordinates
GdkEvent's x_root and y_root values should be in the same "fake root
window" coordinate space as gdk_window_get_root_coords.
2014-03-17 15:36:41 -04:00
Jasper St. Pierre
35a1f49db5 wayland: Fill in x_root / y_root of events properly
Lots of code, including dragging code in GtkWindow, use these
fields. Setting them to 0 causes lots of strange and weird bugs.

Use the same "hack" from query_device_state of just using
win_x / win_y for now. We'll convert this to the proper fake root
coordinate system used by get_root_coords in the next commit.
2014-03-17 15:36:41 -04:00
Carlos Garnacho
41b73e409f x11: Implement "drag to top to maximize" gesture on emulated window dragging
And the counterpart to unmaximize when dragging a maximized window, if
touch devices aren't going to use EWMH moveresize, having this one at least
makes things feel a bit less awkward.

https://bugzilla.gnome.org/show_bug.cgi?id=709914
2014-03-17 18:19:44 +01:00
Carlos Garnacho
d1d4c602e0 x11: Fallback to emulated window dragging for touch devices
Sadly, EWMH moveresize mechanism can't work with touch devices for two
reasons:

1) As a mutter implementation detail, the device is queried in order
to check whether the dragging button is still pressed. Touch devices
won't report the button 1 being pressed through pointer emulation.
2) Even bypassing that check, on X11 touch events are selected prior
to sequences being started, either through XISelectEvents or
XIGrabTouchBegin, no late registering through active grabs is allowed,
as WMs do on reaction to EWMH moveresize messages.

So for the time being, make touch devices fallback on emulated window
dragging, which at least allows for moving windows.

https://bugzilla.gnome.org/show_bug.cgi?id=709914
2014-03-17 18:19:44 +01:00
Jasper St. Pierre
c737045462 xdg-shell: Update to latest state change mechanism 2014-03-12 23:53:04 -04:00
Matthias Clasen
5b2236e3d7 Add a Since annotation to gdk_device_get_last_event_window 2014-03-12 23:04:37 -04:00
Owen W. Taylor
40b6d907bf Use GDK's current window tracking when synthesizing events in GTK+
Add gdk_device_get_last_event_window(), and use to implement the window
tracking we need for synthesizing crossing events for sensitivity changes
and gtk grabs, rather than keeping the information in qdata and updating
it based when GTK+ gets events.

https://bugzilla.gnome.org/show_bug.cgi?id=726187
2014-03-12 23:03:53 -04:00
Owen W. Taylor
1ff2161431 gdk_cairo_surface_create_from_pixbuf: Add missing (allow-none) annotation
The window is allowed to be %NULL
2014-03-12 11:50:55 -04:00
Ryan Lortie
ff0c470e34 broadway: remove unused libcrypt
eb1ab0dac2 removed support for authentication
based on crypt()-hashed passwords but it didn't remove the header.

Finish up with the removal.

This allows the broadway backend to build on FreeBSD (which has no
crypt.h).

https://bugzilla.gnome.org/show_bug.cgi?id=726149
2014-03-12 00:17:09 -04:00
Jasper St. Pierre
fb51bbc565 wayland: Clean up a bit 2014-03-10 13:40:04 -04:00
Jasper St. Pierre
05b8609f80 wayland: Move some code around 2014-03-10 13:40:04 -04:00
Jasper St. Pierre
c92a16fcf5 wayland: Fix submenu positioning
window->x / window->y are in "root window coordinates", e.g. relative
to the topmost toplevel. However, the coordinates in get_xdg_popup are
relative to the passed-in surface, so we need to do the reverse
translation here.
2014-03-10 13:40:04 -04:00
Owen W. Taylor
99ac2f5c49 Fix font size when gdk_x11_display_set_window_scale() is used
We have a hack in the XSETTINGS code to substitute gtk-xft-dpi
with gdk-unscaled-dpi unless the screen has a fixed window scale,
in which case we just use gtk-xft-dpi.

But if the screen is changed to have a fixed window scale, then
the substituted value of gdk-unscaled-dpi will stick around until
the next (coincidental) change to XSETTINGS. To fix this, force
an immediate reread of the XSETTINGS property when
gdk_x11_display_set_window_scale() is used.

https://bugzilla.gnome.org/show_bug.cgi?id=725754
2014-03-06 23:20:00 -05:00
Benjamin Otte
32a420b7d6 broadway: Print a useful error message
.. instead of the generic "failed to open display".
2014-03-05 21:03:36 +01:00
Matthias Clasen
7fae042208 Deprecate GdkEventVisibility and ::visibility-notify-event
These don't really work anymore in a composited world.
Lets make it official.
https://bugzilla.gnome.org/show_bug.cgi?id=481073
2014-03-03 21:39:03 -05:00
Benjamin Otte
e9aa5a9822 gdkwindow: Call function instead of copying its code
gdk_window_get_origin() is just a variant of
gdk_window_get_root_coords() after all.
2014-02-28 03:09:23 +01:00
Jasper St. Pierre
0f212b5fb7 gdkwindow: Always pass the impl window to GdkWindowImpl::get_root_coords
The point of GdkWindowImpl::get_root_coords is to translate the passed
in coordinates against the passed-in impl window. For a child window,
in fact, window->abs_x and window->abs_y already track the child
window's coordinates against the impl window.

If we pass in a child window, and backends don't explicitly get the impl
window from it, we'll double-count the child window.

Really, we should *always* be passing impl windows to backends, and
never child windows. However, I'm a bit worried for regressions late
in the cycle if we want to fix up the rest of the callers, like
gdk_window_get_geometry, so I'm only going to touch get_root_coords
for now after careful review of all the backends.
2014-02-27 21:06:35 -05:00
Jasper St. Pierre
b922e0e213 Remove the return value of GdkWindowImpl::get_root_coords
It's unused by callers, and the historical return values are
undocumented, so just remove it now.
2014-02-27 21:06:35 -05:00
Jasper St. Pierre
056ca21e2f wayland: Seal up a non-declared public member 2014-02-27 17:33:09 -05:00
Jasper St. Pierre
7d67530982 wayland: Remove old, outdated comment 2014-02-27 17:00:56 -05:00
Jasper St. Pierre
08d0bedb28 wayland: Fix margins at startup
GtkWindow calls set_shadow_width then maps the window, meaning
that we never set the margin. Save it when we set and then set
it when we create the XDG surface.
2014-02-27 16:55:02 -05:00
Giovanni Campagna
ad2f96ff48 Gdk: fix wrong user_data handling in resize_cairo_surface()
Instead of destroying the surface in the backend if this is
unable to resize, let the core code do it, and do it properly.

Based on a patch by Benjamin Otte.

https://bugzilla.gnome.org/show_bug.cgi?id=725172
2014-02-26 00:04:41 +01:00
Jasper St. Pierre
084c2feb7e wayland: Don't destroy the cairo surface when resizing it
The code in GDK is incredibly broken and nobody is quite sure what's
right-side-up and what's upside down, but this breaks mutter-wayland
now, so let's remove it. It might leak, but we should probably do a
full restructuring of GDK drawing to fix it.
2014-02-23 16:07:38 -05:00
Rui Matos
6ea4bf8a9d wayland: Fix gdk_window_wayland_resize_cairo_surface()
Like in other backends (except X) we can't resize cairo image surfaces
so let's sync the code here with what the other backends do.

This prevents the painting machinery above us to paint on the wrong
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=724968
2014-02-23 18:40:29 +01:00
Matthias Clasen
6dcf6e0f3b Be more careful to change state atomically
This avoids temporary states of maximized+tiled that
we otherwise report.
2014-02-22 22:24:20 -05:00
Paolo Borelli
e34d9eafed Do not leak cairo_region 2014-02-21 21:11:21 +01:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Jasper St. Pierre
7fbcff8d71 xdg-shell: Update for focused_set / focused_unset rename 2014-02-18 16:48:42 -05:00
Jasper St. Pierre
6845eade49 wayland: Update to new xdg-shell pinging standards 2014-02-18 16:47:34 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Ting-Wei Lan
3e02f52031 Do not return things from a void function
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=724008
Author:    Ting-Wei Lan <lantw44@gmail.com>
2014-02-12 22:48:19 -05:00
Matthias Clasen
3459a0a273 Revert "Introduce API to get the preferred visual"
This reverts commit 2b95d1a34e.

Conflicts:
	gdk/gdkscreen.c
2014-02-10 22:15:28 -05:00
Matthias Clasen
d326507978 Revert "Use gdk_screen_get_preferred_visual()"
This reverts commit 30fa1426cf.

See the bugs
https://bugzilla.gnome.org/show_bug.cgi?id=724067
https://bugzilla.gnome.org/show_bug.cgi?id=723740
for the issues that are the reason for this revert.
2014-02-10 22:12:53 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
Jasper St. Pierre
bfe8a354cd wayland: Add support for set_shadow_width 2014-02-07 19:33:17 -05:00
Jasper St. Pierre
c52e710dc8 wayland: Add support for delete event 2014-02-07 18:30:12 -05:00
Jasper St. Pierre
b14e86fad2 wayland: Remove edges from configure 2014-02-07 18:30:07 -05:00
Jasper St. Pierre
1859d7631b gdkthreads: Update documentation 2014-02-07 18:01:16 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
f0000b2f3d docs: use more apostrophes 2014-02-07 13:26:12 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
f116f0071e docs: use links instead of <xref> 2014-02-07 11:13:11 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
Matthias Clasen
8e797c1195 Wayland: Set gtk-dialogs-use-header
Since we don't have a setting for this, hardcode the value
for now.
2014-02-06 22:51:05 -05:00
Jasper St. Pierre
e583e3ebce gdkwindow-wayland: Make function order match listener order 2014-02-06 14:29:18 -05:00
William Jon McCann
6abe7a7094 docs: use markdown instead of <note> 2014-02-06 08:01:49 -05:00
William Jon McCann
47469eb296 Use proper quotes in gdk 2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
c6ef8bdc9c docs: don't use <para id=""> 2014-02-04 20:21:05 -05:00
William Jon McCann
9ecc35ec68 docs: don't use <orderedlist> 2014-02-04 19:45:36 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
76447c3512 docs: use quotes instead of <firstterm> 2014-02-04 18:10:11 -05:00
William Jon McCann
2dcbe27a06 docs: don't use <option> 2014-02-04 17:48:33 -05:00
William Jon McCann
ff8864cbf3 docs: use a code block instead of <screen> 2014-02-04 17:31:17 -05:00
William Jon McCann
9ff678c37f docs: replace another envar that sneaked in 2014-02-04 17:25:37 -05:00
William Jon McCann
bf7afa48f8 docs: replace all figures with headings and images 2014-02-04 17:20:43 -05:00
William Jon McCann
63e887e165 docs: replace all <examples> with markdown headings 2014-02-04 16:58:54 -05:00
William Jon McCann
9f99f567c8 docs: use markdown instead of inlinegraphic tags 2014-02-04 16:58:53 -05:00
William Jon McCann
8d6717097c docs: Use markdown for ulinks 2014-02-04 16:58:53 -05:00
William Jon McCann
50e06e11ee docs: use markdown instead of <filename> tags 2014-02-04 16:58:53 -05:00
William Jon McCann
a479ee5de5 docs: use markdown for <envar> tags 2014-02-04 16:58:53 -05:00
Matthias Clasen
30fa1426cf Use gdk_screen_get_preferred_visual()
When creating windows, and when returning a widgets
visual, use the new API to get the preferred visual.
2014-02-04 13:15:47 -05:00