Commit Graph

5710 Commits

Author SHA1 Message Date
Руслан Ижбулатов
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