Commit Graph

47145 Commits

Author SHA1 Message Date
Carlos Garnacho
0f962f1075 device: Add gdk_device_get_axes(), and ::axes property
This returns a GdkAxisFlags, holding the axes currently available
through this device.
2016-04-06 15:43:29 +02:00
Carlos Garnacho
32d7ba76b3 device: Add distance/rotation/slider GdkAxisUse values
These are possible to handle in tablets, so add a value for these in the
axis enum.
2016-04-06 15:43:29 +02:00
Руслан Ижбулатов
adff59843b GDK W32: Don't move windows into top-left corner on style change
This fixes a bug that was introduced by db1b24233e.
The reason why 0:0 coordinates were passed was that SWP_NOREPOSITION was
misinterpreted as SWP_NOMOVE. That is not the case - SWP_NOREPOSITION
prevents owner Z-order change, not the window position change.
2016-04-06 10:22:15 +00:00
Olivier Fourdan
be6784c7ea wayland: Do not resize with the same size
gnome-control-center is calling gtk_window_resize() on configure-event
signals which leads to a busy loop.

Avoids such a busy loop by not re-configuring a window with the same
size, unless this is coming from and xdg-shell configure.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764374
2016-04-05 18:22:40 +02:00
Wouter Verhelst
28fc4de6aa Clarify that one cannot use the same variable
A naive way to perform an action on all parent nodes of a given node
could be to do:

while(gtk_tree_model_iter_parent(model, &iter, &iter)) {
	/* perform some action on iter here */
}

However, since gtk_tree_model_iter_parent() will initialize the iterator
pointed to by the second parameter before performing the lookup, this
will not work.

Explicitly document this behaviour.

Signed-off-by: Wouter Verhelst <w@uter.be>

https://bugzilla.gnome.org/show_bug.cgi?id=573380
2016-04-05 11:01:53 -04:00
Bastien Nocera
93363551d7 cups: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
becc0d45b6 recent-manager: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
6a5224ffcb file-chooser-widget: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
a8c59543cf about-dialog: Fix "format not a string literal" errors
A non-intrusive fix.

https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Bastien Nocera
bf8653c2e1 ui-manager: Fix "format not a string literal" errors
Quite a bit of code movement, but necessary to build with the
default format errors produced by newer versions of GCC.

https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Lapo Calamandrei
85e37925f0 Adwaita: transparent textview border border
So it will play nicely with gedit color combinations.
See https://bugzilla.gnome.org/show_bug.cgi?id=764203
2016-04-04 12:03:11 +02:00
Tom Tryfonidis
d5b78d474a Updated Greek translation
(cherry picked from commit 40afffb9fd)
2016-04-04 09:28:33 +00:00
Matthias Clasen
2f0354fcf9 Move GdkDeviceManager to deprecated section
It has been superseded by GdkSeat.
2016-04-03 23:41:20 -04:00
Matthias Clasen
8ef12fda83 Add an index for 3.22 api additions 2016-04-03 23:33:57 -04:00
Matthias Clasen
9bfc8371fe wayland: Remove an unused vfunc 2016-04-03 18:18:17 -04:00
Matthias Clasen
59e40f3d6f wayland: Remove unused field 2016-04-03 18:18:17 -04:00
Kristjan SCHMIDT
62a7447c5f Updated Esperanto translation 2016-04-03 02:20:00 +02:00
Kristjan SCHMIDT
f052f1554b Updated Esperanto translation 2016-04-03 00:46:18 +02:00
Timm Bäder
58891c1fe5 headerbar: Don't underallocate the label box
We use a label_sizing_box to make sure the headerbar can always contain
both a title and a subtitle without resizing when showing/hiding either
of them, but we should only do that for the height; the min width of the
label_box can be larger than that of the label_sizing_box.
2016-04-02 17:03:52 +02:00
Lapo Calamandrei
d23c6c6246 Adwaita: style textview border
see https://bugzilla.gnome.org/show_bug.cgi?id=764203
2016-04-02 16:24:52 +02:00
Lapo Calamandrei
f2f1725b40 Adwaita: cosmetic fixes 2016-04-02 16:03:02 +02:00
Carlos Garnacho
2784eacf00 wayland: Avoid NULL slave devices in GdkSeat::get_slaves
Just because we're asked for a capability, it doesn't mean we have
it.
2016-04-01 19:10:36 +02:00
Lapo Calamandrei
b1205a9c96 Adwaita: set secondary caret color to selection blue
see https://bugzilla.gnome.org/show_bug.cgi?id=764204
2016-04-01 16:48:13 +02:00
Rui Matos
4bfa6c30bf gtkwindow: Don't allow unresizable windows to be smaller than required
Commit cdc580463e made it so that
unresizable windows can't be smaller than a set default size but it
lost the logic to ensure these windows remain at least big enough to
comply with their requisition.

https://bugzilla.gnome.org/show_bug.cgi?id=764174
2016-04-01 15:30:03 +02:00
Timm Bäder
84dfda1a2b widget: Always warn when underallocating widgets 2016-04-01 10:04:25 +02:00
Matthias Clasen
4c698bc824 wayland: Print out more debug info
Print out the subpixel layout and frame rates that the compositor
sends us.
2016-03-31 20:31:00 -04:00
Alexander Larsson
4c10800bcc gdkwindow: Remove O(n-children) code in gdk_window_invalidate
When we invalidate a window we need to also invalidate all child windows
that are native (non-native are automatically invalidated as we track
invalidation once per native window only). This was done in a pretty
inefficient way, recursing over the entire tree.

This makes the invalidation much faster by only looking at the native
children of the native window we're in, filtering out those that
are not a descendant of the client side window we're interested in.
Given that there are very few native subwindows this is much faster.
2016-03-31 18:56:18 +02:00
Matthias Clasen
d1acb786a7 icon theme: Make the builtin hicolor index match reality
We were missing all of the status directories, and a few sizes.
This was causing us to not find image-missing on systems without
hicolor icon theme (this basically only happens on Windows).

https://bugzilla.gnome.org/show_bug.cgi?id=764378
2016-03-31 07:12:50 -04:00
Theppitak Karoonboonyanan
a93e477a4d Updated Thai translation. 2016-03-31 09:13:42 +07:00
Matthias Clasen
6faafbff6e Use AM_DISTCHECK_CONFIGURE_FLAGS
This is preferred over DISTCHECK_CONFIGURE_FLAGS in modern automake.
2016-03-30 21:54:04 -04:00
Matthias Clasen
d8da5879aa Adwaita: theme acceleditor > label
We need to have an opaque background here, otherwise the underlying
cell shines through.

https://bugzilla.gnome.org/show_bug.cgi?id=764376
2016-03-30 19:50:22 -04:00
Matthias Clasen
72178fd0c9 Accel cell renderer: Set a css name
Give the event box we use here the distinctive name "acceleditor".
2016-03-30 19:50:22 -04:00
Benjamin Otte
71a5f07620 widget: queue a redraw only if resize highlighting is enabled
e8aa9b0440 introduced a new debug mode
that highlights resizes. Unfortunately it has the side effect of
always queueing redraws even when the debug mode is not enabled.
Make the redraw conditional.
2016-03-30 21:44:58 +02:00
Debarshi Ray
fd143a2b38 window: Make the sample code obey the party line on geometry widgets
The geometry_widget parameter is deprecated [1]. If one is passed, we
remove GDK_HINT_BASE_SIZE and GDK_HINT_RESIZE_INC from the mask [2].

[1] commit 08974a1e9a
[2] commit f7cc4abbad

https://bugzilla.gnome.org/show_bug.cgi?id=764321
2016-03-30 13:21:50 +02:00
Руслан Ижбулатов
bde5281ae8 GDK W32: Use a dumb window class for decorative windows
Currently only one kind of decorative window is in use - the shape
indicator that is shown when snapping windows to the edge of the screen.

When normal toplevel class is used, its window procedure expects certain
motions from GDK (passing user data to CreateWindowEx(), registering
handle in a hash map etc), and might crash if that is not done.

Dumb window doesn't require anything, it can just be.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 09:04:46 +00:00
Руслан Ижбулатов
cfbb8c5252 GDK W32: Add/subtract shadow when (un)snapping
Now halfleft/halfright/fullup snaps do hug screen edges as intended.

Documents AeroSnap behaviour when snapped windows are drag-resized
(currently this implementation handles this in a very simplistic way).

Don't believe GTK when it tells us that window shadow is 0, preserve
previous values (but do remember that GTK wants no shadow, in case
we need that).

Fixes a couple of bugs in unsnapping (check offset against the half
of the window; don't put pointer in the middle of the window vertically
if it still fits in the top half).

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 09:04:37 +00:00
Руслан Ижбулатов
f853283d7b GDK W32: Add/subtract shadow when drag-resizing
Implements gdk_win32_window_set_shadow_width().
Uses shadow width/height to adjust max tracking size, allowing
windows to be drag-resized to cover the whole desktop.

Also uses SM_C*VIRTUALSCREEN instead of SM_C*MAXTRACK.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 09:03:56 +00:00
Руслан Ижбулатов
b0131616b2 GDK W32: Draw snap indicators for AeroSnap
Indicator is a bare layered click-through native window,
painted completely by GDK, including animation.

This commit also isolates some of the more spam-ish debug logging
under ifdef.

This commit also changes the system metric used for maximal window
height for the snapping purposes. Turns out, SM_CYMAXTRACK is way
too large, use SM_CYVIRTUALSCREEN instead.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 09:03:41 +00:00
Руслан Ижбулатов
b420c53773 GDK W32: Add drag-to-snap feature to AeroSnap
This implements the part of AeroSnap that snaps windows when you
drag them (while moving or resizing) to the edge of the screen.

It also fixes drag behaviour for snapped and maximized windows
(if such windows are dragged, first they must be unmaximized/unsnapped).

Note that this code does not take into account the shadow width, and
because of that the under-pointer-position-preserving window moves
might not look as such for maximized windows, which lack the shadow
when maximized, but do have the shadow when unmaximized.

This commit also doesn't cover some corner-cases the same way AeroSnap does.

Also, the snapping indicator (which is supposed to be a window shape that
shows where the window will be if the drag op is stopped at its current
point) is not being drawn, all routines responsible for its creation,
moving and drawing are stubs.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 09:00:07 +00:00
Руслан Ижбулатов
2ea96cf946 GDK W32: Improve AeroSnap - don't resize windows that fit
This is what AeroSnap does. If a window is being unsnapped on
a new monitor, check if the work area is large enough for the
window to fit in its normal size. If the window fits, just
reposition it so that the ratio of
left-window-edge-to-screen-edge / right-window-edge-to-screen-edge
remains the same, without scaling the window.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 09:00:02 +00:00
Руслан Ижбулатов
0ce217cf94 GDK W32: Re-implement AeroSnap for CSD windows
It works exactly like AeroSnap.
Except for shift+win+left/right, which is left for AeroSnap
to handle (AeroSnap takes action before we get the message,
so there's no way for us to override it).
The only thing that doesn't work is shift+win+left/right on
a maximized window, for reasons unknown at the moment.

This only implements winkey+stuff behaviour of AeroSnap,
not the drag-to-the-edge-and-something-funny-happens one.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
2016-03-30 08:59:56 +00:00
Debarshi Ray
27a1b50bc6 window: Fix gtk_window_set_geometry_hints documentation
The geometry_widget parameter is ignored from 3.20 onwards [1], not
3.18 as mentioned in the documentation.

[1] commit 08974a1e9a

https://bugzilla.gnome.org/show_bug.cgi?id=764321
2016-03-29 19:31:59 +02:00
Emmanuele Bassi
6267b6b6eb Bump to 3.21.0
Otherwise newly added API will start warning.
2016-03-29 16:24:14 +01:00
Руслан Ижбулатов
77eebbda5c GDK W32: Erase hidden layered windows before showing them
If a layered window was hidden and is made visible, erase its
contents before showing it. GDK will schedule a redraw, but until
then we generally don't want to show old contents.

https://bugzilla.gnome.org/show_bug.cgi?id=763783
2016-03-29 14:30:19 +00:00
Руслан Ижбулатов
cea8c29a26 GDK W32: Implement show_window_menu()
This is achieved by sending undocumented message WM_SYSMENU
to the window.
Before doing that, the window is given WS_SYSMENU style
(to enable window menu) and some combination of
WS_MAXIMIZEBOX (for "Mazimize" item)
WS_MINIMIZEBOX (for "Minimize" item)
WS_SIZEBOX (for "Size" item)
depending on which operations are currently permissible.

WM_SYSMENU is processed by DefWindowProc(), which results
in showing the window menu. We remove extra styles
at the first opportunity (WM_INITMENU message), as they
alter the way our window is rendered.

https://bugzilla.gnome.org/show_bug.cgi?id=763851
2016-03-29 13:47:49 +00:00
Lapo Calamandrei
38f94194a6 Adwaita: set caret-color for drop targets 2016-03-29 15:06:11 +02:00
Lapo Calamandrei
e7cd3dddd8 Adwaita: cosmetic fix 2016-03-29 15:01:57 +02:00
Matthias Clasen
43a568395b Add some tests for GdkRectangle
In particular, we're testing corner cases with empty rectangles
here.
2016-03-28 19:54:55 -04:00
Matthias Clasen
669336cf95 Expand visual tests a bit 2016-03-28 19:28:57 -04:00
Matthias Clasen
785a425516 Add tests for seat apis
These are just some basic sanity tests.
2016-03-28 19:22:36 -04:00