1
0
Fork 0
Commit graph

22 commits

Author SHA1 Message Date
Rui Matos
5ba38a4ab6 x11/xprops: Plug a few memory leaks
Commits 6dbec6f8, 734402e1 and f041b35b introduced memory leaks by
switching to returning copies instead of the original buffers but
forgetting to free those original buffers.

Some error cases were also not freeing the ->prop buffer as they
should.

https://bugzilla.gnome.org/show_bug.cgi?id=642652
2017-02-21 19:51:46 +01:00
Sebastian Keller
a7a376ae1f xprops: Null-terminate property reply values
Some of the mutter code using these properties expects them to be
null-terminated whereas xcb does not use null-terminated strings:

http://xcb.freedesktop.org/XcbRationale/

This was in some cases resulting in the WM_CLASS property containing
garbage data which broke application matching, caused the hot-corner and
window-switcher to stop working, or was exposed as text in the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=759658
2016-01-12 16:30:30 +01:00
Rui Matos
54557f062e xprops: Fix reading Window and XSyncCounter properties
Both Window and XSyncCounter are XIDs which on 64 bit X clients are 8
bytes wide. But the values on the wire are 32 bit so, for these types,
we always copy 4 bytes into results->prop. As such copying them out
with a cast such as *(Window *) means that we are actually reading 8
bytes which depending on whether the higher addressed 4 bytes are zero
means that sometimes this works while others it gives us a bogus
value.

https://bugzilla.gnome.org/show_bug.cgi?id=756074
2015-10-06 22:33:42 +02:00
Jasper St. Pierre
f041b35b9b xprops: Fix STRING types as well 2015-06-26 13:51:45 -07: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
3962f1d982 xprops: Apply the same Xlib / 64-bit hygiene to atom lists 2015-06-23 15:37:58 -07:00
Jasper St. Pierre
414be07a69 xprops: Remove unused synchronous property getters
No reason to keep these around..
2015-06-23 15:37:23 -07:00
Jasper St. Pierre
7f3ada7831 xprops: Some more cardinal-related hygiene 2015-06-23 15:32:07 -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
Jasper St. Pierre
734402e14d xprops: Cut off UTF-8 strings at n_items characters
There can be junk after here on some X servers.
2015-06-23 11:53:30 -07:00
Jasper St. Pierre
5d360a9bce xprops: Make sure that properties that failed to fetch are ignored 2015-06-23 11:52:49 -07:00
Jonas Ådahl
bbf2b4e60e xprops: Don't pass ULONG_MAX as a uint32_t parameter
It seems the largest possible value is to be passed, so actually pass
that instead. Note that even though the name of the xcb_get_property
parameter is called 'long_length' its actually a uint32_t.

https://bugzilla.gnome.org/show_bug.cgi?id=751136
2015-06-18 11:38:00 +08:00
Jasper St. Pierre
2345b9c6ad xprops: Fix syntax error 2015-06-17 18:19:53 -07:00
Jasper St. Pierre
af7cc87bfa xprops: More XFree => g_free compatibility 2015-06-17 18:18:43 -07:00
Jasper St. Pierre
af3b599cbb xprops: Remove cvtINT32toInt
These are awful compatibility hacks for systems without native 64-bit
support. We can trash these now.
2015-06-17 18:18:03 -07:00
Jasper St. Pierre
0e73ceb4bd x11: Remove async-getprop
xcb can do this for us now.
2015-06-17 18:08:11 -07:00
Giovanni Campagna
ea354e96cb xprops: free the text list content too
A text list is an array of pointers into a buffer. Freeing the
array is not enough, we need to free the buffer too.

https://bugzilla.gnome.org/show_bug.cgi?id=729732
2014-05-07 19:04:54 +02:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -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
Jasper St. Pierre
b9e9595e8b errors: Kill off meta_error_trap_push_with_return
It isn't special; it's just an alias for meta_error_trap_push.
2014-04-07 10:37:03 -04:00
Jasper St. Pierre
840378ae68 xprop: Don't use GDK for reading text properties 2014-04-07 10:37:02 -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/xprops.c (Browse further)