1
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Florian Müllner
891cab3bb3 window-props: Fix frame update on hide-titlebar-when-maximized changes
Since we started caching frame borders in commit b4036e061, we need to
invalidate the cache for changes of the GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED
property to take effect immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=781862
2017-04-27 23:04:08 +02:00
Carlos Garnacho
ae73e9d84d x11: Double check whether the user time window was previously used
Some applications like Wine may choose to juggle the same user time
window across different toplevels, in that case we receive warnings
when trying to register the window a second time, leading to wrong
accounting.

If the window was already used as the user time window for another
toplevel, unset it from the previous MetaWindow owner, and unregister
so the registration with the new MetaWindow is successful.

https://bugzilla.gnome.org/show_bug.cgi?id=774330
2016-11-15 17:33:46 +01:00
Jonas Ådahl
95a68854ad configure.ac: Add AC_GNU_SOURCE
We define it here and there already, and if we are to include private
cogl files, we need it in more places. Lets just add it everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Rui Matos
d62491f46e x11/window-props: Convert WM_NAME and WM_CLASS to UTF-8
gjs throws exceptions on non UTF-8 strings which, in some cases, crash
gnome-shell. ICCCM string properties are defined to be Latin-1 encoded
so we can try to convert them to avoid it.

Note that _NET_WM_NAME is defined to be UTF-8 and we already validate
it in utf8_string_from_results() .

https://bugzilla.gnome.org/show_bug.cgi?id=752788
2016-06-07 20:17:38 +02:00
Rui Matos
7606f79a1e x11/window-props: Initialize bypass compositor hint
If a client only ever sets the hint on window creation we'd never pick
the value. Also, include override redirect windows since the hint is
relevant to them too.

https://bugzilla.gnome.org/show_bug.cgi?id=758544
2015-11-23 19:54:48 +01:00
Rui Matos
07f533f617 window: Remove fullscreen_after_placement special case
This was introduced in commit c6793d477a
to prevent window self-maximisation. It turns out that that bug seems
to have been fixed meanwhile in a different way since the reproducer
in https://bugzilla.gnome.org/show_bug.cgi?id=461927#c37 now works
fine with this special handling removed.

In fact, failing to set window->fullscreen immediately when loading
the initial set of X properties causes us to create a UI frame for a
window that sets _NET_WM_STATE_FULLSCREEN.

This, in turn, might cause the fullscreen constrain code to fail if
the window also sets min_width/min_height size hints to be the monitor
size since the UI frame size added to those makes the rectangle too
big to fit the monitor. If the window doesn't set these hints, we
fullscreen it but the window will get sized such that the UI frame is
taken into account while it really shouldn't (see the reproducer
above).

https://bugzilla.gnome.org/show_bug.cgi?id=753020
2015-07-30 15:27:01 +02:00
Jasper St. Pierre
6dbec6f81b xprops: More Xlib / long cleanliness with Motif WM hints
Fixes some CSD windows sometimes getting frames when they totes
shouldn't.
2015-06-24 14:34:48 -07:00
Jasper St. Pierre
92d6a69153 xprops: Fix more gulong / 64-bit fallout from the xcb port 2015-06-23 15:09:32 -07:00
Cosimo Cecchi
11a9b4baa0 window-props: use memcmp() to compare GtkBorder structs
Saves some code.

https://bugzilla.gnome.org/show_bug.cgi?id=744500
2015-02-13 15:49:03 -08:00
Jasper St. Pierre
90111c03a1 Only poke the frames UI code from inside frame.c
Add frame.c wrappers for the missing calls, then adapt.
2014-12-31 22:35:29 -08:00
Jasper St. Pierre
461aea47dd window: Adjust the frame rect when _GTK_FRAME_EXTENTS is set on map 2014-09-19 17:35:38 -06:00
Jasper St. Pierre
d87093fe29 window: Don't queue move/resizes if the extents are the same
GTK+ sets the frame extents on every allocation, so don't bother doing
any extra work if things are the same.
2014-09-19 17:35:38 -06:00
Jasper St. Pierre
0cde7879d6 window: Move set_custom_frame_extents to be X11-only
Wayland doesn't use custom frame extents anymore -- it uses a full
geometry description.
2014-09-19 17:35:38 -06:00
Jasper St. Pierre
879407c10c window: Kill off a now-unnecessary state variable 2014-08-13 18:25:46 -04:00
Florian Müllner
b7119c55a6 window-props: Add FORCE_INIT flag to force hooks for unset properties
Since commit a7b7213017, we rely on the standard property
system to initialize the window type (and likewise for the window
role since commit 031154a400). However as property hooks are
never run for properties that are not set, we end up not initializing
the window type correctly for windows with no _NET_WM_WINDOW_TYPE
property (which includes virtually all OR windows, causing them to
show up in pagers and the Shell overview and resulting in frequent
crashes due to breaking reasonable assumptions all over the place).

Introduce a new FORCE_INIT flag to allow forcing hooks to run
even when the corresponding property is unset, and use it for
both _NET_WM_WINDOW_TYPE and _NET_WM_WINDOW_ROLE.
2014-08-02 20:26:00 +02:00
Jasper St. Pierre
941d202938 window: Move X11-specific icon code to MetaWindowX11 2014-07-14 12:15:23 -04:00
Jasper St. Pierre
39357fc242 window-props: Don't make another round-trip to fetch the opaque region
We already have the property value from our property fetching.
2014-07-13 22:51:25 -04:00
Jasper St. Pierre
bee97ab6a7 window-props: Make sure that recalc_window_type is always called 2014-07-10 17:07:52 -04:00
Jasper St. Pierre
b87db00fdb window-props: Fizzle out PropertyNotifies that happen after initial map
Properties like _NET_WM_DESKTOP and _NET_WM_STATE are supposed to be
ignored after the initial map of the window, so ignore any
PropertyNotifies for these.
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
6190b65056 window-props: Use a flags-based approach for our prop hooks
This allows us to extend the table better with newer flags.
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
10fe91d704 window-props: Don't load WM_STATE
Since we don't do anything with it.
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
36bb05b10e window-props: Fix assert testing
I have *no* idea how this even compiled in the first place. What the hell?
2014-07-10 15:05:42 -04:00
Jasper St. Pierre
a7b7213017 window-props: Use the standard property type system for _NET_WM_WINDOW_TYPE 2014-07-10 15:05:40 -04:00
Jasper St. Pierre
031154a400 window-props: Use the standard property type system for WM_WINDOW_ROLE
There seems to be no reason we can't just use this.
2014-07-10 14:56:23 -04:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Jasper St. Pierre
2101c8357b Move sync_request_* handling mostly to window-x11 2014-04-29 17:58:23 -04:00
Jasper St. Pierre
20a0eb9809 Require the XSync and XShape extensions at build-time
It's been long enough. We can mandate support for these, at least
at build-time. The code doesn't actually compile without either
of these, so just consider that unsupported.
2014-04-22 14:17:09 -04:00
Owen W. Taylor
ebbdfabed6 window-props.c: React to changes to _GTK_FRAME_EXTENTS
When _GTK_FRAME_EXTENTS changes, we need to redo constraints on
the window - this matters in particular if the toolkit removes
invisible borders when a window is maximized, since otherwise
the maximized window will be positioned as if it still has
invisible borders.

https://bugzilla.gnome.org/show_bug.cgi?id=714707
2014-04-09 12:20:45 -07:00
Nirbheek Chauhan
ab0bd59f5e window-props: _NET_WM_WINDOW_OPACITY range is 0xffffffff to 0
After reading the atom, scale the value from 0xffffffff to 0xff. Not doing so
causes Clutter to truncate the opacity value, and only read the last two digits.
Hence, 0x7fffffff (50%) becomes 0xff (100%).

https://bugzilla.gnome.org/show_bug.cgi?id=727874
2014-04-09 16:40:10 +02:00
Jasper St. Pierre
a1427c7130 Revert "Move MetaGroup to be X11-specific"
This reverts commit f940292cfe.

Turns out MetaGroup was public API and was used by gnome-shell.
Ugh.
2014-03-19 09:12:48 -04:00
Jasper St. Pierre
0a20f7458c window: Remove support for _NET_WM_ICON_NAME
We don't seem to use it anywhere.
2014-03-18 22:04:36 -04:00
Jasper St. Pierre
f940292cfe Move MetaGroup to be X11-specific 2014-03-18 21:23:36 -04:00
Jasper St. Pierre
6efcf2526d window: Move urgency to a setter 2014-03-18 15:44:11 -04:00
Jasper St. Pierre
d6a27195d3 Move more fields to MetaWindowX11 2014-03-18 15:44:11 -04:00
Jasper St. Pierre
8f151842fb Start moving X11 implementation to its own subdirectory
This is specifically about managing X11 windows, not necessarily
running as an X11 compositor. By that I mean that this code is
still used for XWayland windows, and event handling is still and
modesetting / monitor management is still in core/.

This is also a fairly conservative move. We don't move anything
like screen.c or bell.c in here, even though those are really
only for X11 clients.
2014-03-18 15:44:11 -04:00
Renamed from src/core/window-props.c (Browse further)