1
0
Fork 0
Commit graph

1541 commits

Author SHA1 Message Date
Jasper St. Pierre
941d202938 window: Move X11-specific icon code to MetaWindowX11 2014-07-14 12:15:23 -04:00
Jasper St. Pierre
5ea0cf8bab iconcache: Remove a useless icon_cache_free
All it does is poke a few fields. There is no point to it.
2014-07-14 12:02:58 -04:00
Jasper St. Pierre
df9a5f867f core: Remove useless meta_invalidate_default_icons implementation
This code was supposed to refresh our default icons when the theme
changed, but it actually was a no-op, since the default icons are cached
in a static variable in MetaUI.

I'm not sure the fact that the fallback icons don't update when the
theme changes is an important enough use case to keep working, but I'm
keeping the skeleton function there in case somebody wants to actually
fix it properly.
2014-07-14 12:00:34 -04:00
Jasper St. Pierre
55354f5c38 Take the touch grab in MetaBackendX11
This means that it won't trigger when we're running as a Wayland
compositor, which will cause a few warnings and possibly more
brokenness.
2014-07-14 09:41:10 -04:00
Jasper St. Pierre
379bb0a77d screen: Don't make a round-trip to fetch a value we know to be empty 2014-07-14 09:40:43 -04:00
Jasper St. Pierre
f9d33b2efc display: Add an extra check inside meta_display_close
For clarity of what the expected input to this function is.
2014-07-13 11:37:31 -04:00
Jasper St. Pierre
2185904fcb display: Use a local here instead of the global the_display
This will make it easier to split some of this functionality out into
other subfunctions.
2014-07-13 11:35:38 -04:00
Jasper St. Pierre
d7d8c92a9a Remove unused Wayland includes 2014-07-13 11:35:01 -04:00
Owen W. Taylor
88a7790d44 MetaDisplay: remove meta_display_grab()/ungrab()
Now that we have two connections to the X server, the idea of a
ref-counted server grab that might be held across extended portions
of code is very dangerous since we might try to use the backend
connection while the frontend connection is grabbed.

Replace the only usage (which was local) with direct
XGrabServer/XUngrabServer usage and remove the meta_display_grab()
API.

https://bugzilla.gnome.org/show_bug.cgi?id=733068
2014-07-11 13:39:07 -04:00
Owen W. Taylor
806dabe2d7 Don't grab the server when unmanaging the screen
There's no obvious reason for grabbing the X server when unmanaging
a screen - the only race conditions a server grab solves are those
related to querying and then acting on the results of the query.

Our shutdown sequence is correctly ordered according to the ICCCM -
we first unselect on the root window, and then we destroy the
window owning WM_S<n> so removing the grab should not cause any
problems when we are being replaced with another window manager.

https://bugzilla.gnome.org/show_bug.cgi?id=733068
2014-07-11 13:39:07 -04:00
Jasper St. Pierre
740e7ddd69 window: Manage after setting the OR special case properties 2014-07-10 17:08:14 -04:00
Jasper St. Pierre
59fc17c355 util: Turn STACK debugging back off
Snuck in by accident.
2014-07-10 16:54:48 -04:00
Jasper St. Pierre
5f25ca0c3a stack-tracker: More small cleanups 2014-07-10 16:29:35 -04:00
Jasper St. Pierre
41b4a079c7 stack-tracker: Remove unused variable 2014-07-10 16:29:35 -04:00
Jasper St. Pierre
e4235376d8 stack-tracker: Add some more debug output 2014-07-10 16:29:34 -04:00
Jasper St. Pierre
043a201f90 stack-tracker: Clean up dumping 2014-07-10 16:29:18 -04:00
Jasper St. Pierre
d1a588a94f stack-tracker: Fix the case where the serial is too old
The code here before was just flat out wrong, and made us consistently
requery the server at startup.
2014-07-10 16:02:01 -04:00
Jasper St. Pierre
01b6d9bfe2 stack-tracker: Fix code style 2014-07-10 16:00:38 -04:00
Jasper St. Pierre
9711d95996 stack-tracker: Fix comments 2014-07-10 16:00:38 -04:00
Jasper St. Pierre
463b50e746 screen: Fetch the COW window up-front
XGetCompositeOverlayWindow is a round trip to the X server. We shouldn't
be doing it on every MapWindow.
2014-07-10 14:18:02 -04:00
Jasper St. Pierre
1749a85e96 frame: Only XSync when we're on the X11 compositor backend
The only case we have is the case where the two X11 connections are the
same. When on Wayland, the XSync is costly and expensive, and we should
minimize it.
2014-07-10 13:31:26 -04:00
Jasper St. Pierre
1af9e92e91 Don't add in our old input event mask when we select input events
This causes a round-trip to the server, and just isn't necessary, since
we're always in charge of our event mask.
2014-07-10 13:30:05 -04:00
Florian Müllner
06a31992e3 screen: Tweak workspace initialization (again)
Commit 8100cefd4c fixed a crash during workspace initialization by
tweaking the startup sequence; as a result, the plugin (like gnome-shell)
is now started before workspaces are fully initialized, which breaks
some reasonable assumptions (like always having an active workspace).
This is particularly problematic considering that the code making those
assumptions is not necessarily our own (extensions!), so return to
fully initialize workspaces before the compositor again.
At the same time, make sure to only call meta_workspace_activate()
once during initialization to avoid reintroducing the crash.

https://bugzilla.gnome.org/show_bug.cgi?id=732695
2014-07-10 17:50:59 +02:00
Jasper St. Pierre
4e2092d593 gesture-tracker: Rename files to include the meta- prefix 2014-07-08 13:30:26 -04:00
Jasper St. Pierre
9755f308e5 gesture-tracker: Update documentation format 2014-07-08 13:28:48 -04:00
Jasper St. Pierre
09610daea1 gesture-tracker: Don't pass an autodeny-timeout
Just use the default value of 250.
2014-07-08 13:27:38 -04:00
Jasper St. Pierre
c10c8649f5 window: Reformat a comment 2014-07-08 12:45:34 -04:00
Jasper St. Pierre
82dce6758a window: Remove pending pings in unmanage
This makes sure that we see them for Wayland clients as well, and don't
time out and crash when we're accessing an invalid window / surface.

Spotted-by: Rui Matos <tiagomatos@gmail.com>
2014-07-08 12:17:08 -04:00
Jasper St. Pierre
024652bfb4 window: Set the surface to NULL when unmanaging 2014-07-08 12:14:20 -04:00
Carlos Garnacho
789608b637 gesture-tracker: Implement threshold-based sequence rejection
If a sequence moves past a certain distance without being used by a
gesture, reject it so clients may see and react to it ASAP. This makes
gestures to be began by initially quasi-static touchpoints, in addition to
quasi-simultaneous.
2014-07-08 11:30:12 -04:00
Carlos Garnacho
23b074481a display: Set an X11 passive touch grab on the root window
Touch events will be caught first by the compositor this way,
whenever the MetaGestureTracker notifies of the accepted/rejected
state of a sequence, XIAllowTouchEvents() will be called on it
accordingly, so it is handled exclusively by the compositor or
punted to clients.
2014-07-08 11:21:29 -04:00
Carlos Garnacho
5dc8fa6690 events: Hook MetaGestureTracker to display event processing
Events aren't actually consumed by the MetaGestureTracker, but it
rather defines whether the event will reach clients, or the stage.
2014-07-08 11:21:29 -04:00
Carlos Garnacho
a9ba98686f display: Add a global MetaGestureTracker 2014-07-08 11:21:28 -04:00
Carlos Garnacho
59382bace2 core: Add MetaGestureTracker
This object tracks both touch sequences happening on the stage and
gestures attached to the stage actor. When a gesture emits
::gesture-begin, All triggering sequences and future ones will be
marked as "accepted" by the compositor, and events will be listened
for meanwhile there are active gestures.

If a sequence goes unclaimed for a short time, it will be
automatically "denied", and punted to the client or shell element
below.
2014-07-08 11:21:28 -04:00
Giovanni Campagna
f807207b65 window: expose meta_window_is_client_decorated() in the API 2014-07-08 12:10:54 +02:00
Jasper St. Pierre
30b54aae34 frame: Don't select for core events on the frame window
We override these with XI2 event types anyway. There's no point to
selecting to them.
2014-07-07 19:22:09 -04:00
Carlos Garnacho
a05ae8654c events: Update current time on CLUTTER_TOUCH_BEGIN events
Just as with key/button press events, update the current interaction
time when a touch begins on a window.
2014-07-07 19:17:06 -04:00
Carlos Garnacho
7b0930f798 frame: Only select for ButtonPress/Release/Motion/Crossing
Touch events are largely ignored on GdkEvent emulation, so only
make frames receive pointer events, only the pointer emulating
touch will be reported, and any other further touches will be
ignored, which is about the behavior we want. This makes window
dragging possible again on touch.
2014-07-07 19:17:06 -04:00
Jasper St. Pierre
c2abe43ee7 window: Only update the unconstrained rect when we actually moved/resized
Since Wayland configures are more of a hint to the client than anything,
we don't want to save the unconstrained rect when we're just hinting to
the client that it should resize, since it could ignore us. This would
get us stuck in a loop, since meta_window_move_resize_now would use the
unconstrained_rect to resize, and we don't remove the resize from the
queue if we have an outstanding request like that.

This fixes a bunch of traffic / CPU usage when trying to resize
weston-terminal.
2014-07-07 14:11:14 -04:00
Jasper St. Pierre
02220ed6c7 window: Don't eat events on O-R windows
For XWayland, we need to make sure to send out mouse events on O-R
windows, otherwise they won't get motion or button events.

The comment mentions being eaten for the compositor, but we already
bypass the compositor for all events that have a window. The return
value just controls whether we pass them to Wayland.
2014-07-01 14:41:38 -04:00
Jasper St. Pierre
af135c0b0b monitor-manager: Rename output_id to winsys_id
The output_id is more of an opaque identifier for the monitor, based on
its underlying ID from the windowing system. Since we also use the term
"output_id" for the output's index, rename our use of the opaque cookie
"output_id" to "winsys_id".
2014-07-01 13:24:34 -04:00
Jasper St. Pierre
42c972735e window: Don't treat an output_id of 0 as an invalid ID 2014-07-01 13:18:31 -04:00
Jasper St. Pierre
0a47d135ac screen: Fix up last commit
Forgot to squash after building.
2014-06-27 14:05:38 -04:00
Jasper St. Pierre
ec8ed1dbb0 screen: Set a black background for testing purposes 2014-06-27 12:38:11 -04:00
Jasper St. Pierre
f1d8428650 window: Fix get_client_area_rect for the frame rect conversion
Specifically for CSD windows -- this was just absolutely wrong
before. This fixes weird painting and clipping artifacts for
CSD windows.
2014-06-27 11:58:39 -04:00
Owen W. Taylor
8d29d22e99 meta_accelerator_parse(): handle keysyms without the XF86 prefix
The GDK and hence GNOME standard is that keys that begin with XF86 according to
libxkbcommon not prefixed with XF86, though gdk_keyval_from_name() strips XF86
if provided. If libxkbcommon doesn't recognize the accelerator name without
XF86, try again adding XF86 to the start.

This restores compatibility with gnome-settings-daemon, schemas, and existing
user configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=727993
2014-06-27 10:37:42 -04:00
Jasper St. Pierre
a615f93060 window: Set custom frame extents to 0 if we don't have any
This is just a quick code cleanup.
2014-06-26 13:58:11 -04:00
Giovanni Campagna
c562657f1e main: kill custom log handler
It just gets in the way of gnome-shell's log handler (which
includes gjs backtraces optionally), it requires people to understand
what 8 or 16 mean as log levels, and it loses the log domain.
2014-06-26 19:10:28 +02:00
Jasper St. Pierre
bb92054c86 window: Use g_object_notify_by_pspec 2014-06-26 10:31:22 -04:00
Jasper St. Pierre
4e4a6eb5d7 window: Use g_object_class_install_properties 2014-06-26 10:31:01 -04:00