Compare commits

..

26 Commits

Author SHA1 Message Date
Florian Müllner
21c46852cd Bump version to 3.11.2
Update NEWS.
2013-11-13 20:50:11 +01:00
Florian Müllner
10036832dd doc: Fix file globs
Any files matching the previously used globs are no longer distributed,
breaking distcheck. Match the actual sources in compositor/, core/, meta/
and ui/ instead.
2013-11-13 20:49:52 +01:00
Jasper St. Pierre
25b5ea8b4f screen: Laters are not GSources
This warns with the new GLib when we destroy the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=711731
2013-11-09 11:46:01 -05:00
Jasper St. Pierre
20beaf7fe1 compositor: Clean up comment
So it seems that we were intentionally delaying the output window,
although I wonder why...
2013-11-05 09:15:23 -05:00
Jasper St. Pierre
e72af50420 compositor: Initialize the plugin manager after initializing the output window
Plugins like gnome-shell may want to grab the output window immediately
before bouncing back to the mainloop.
2013-11-04 10:39:49 -05:00
Lionel Landwerlin
ef4417b717 window: don't ignore resize button release event for move/resize actions
https://bugzilla.gnome.org/show_bug.cgi?id=710251
2013-11-04 13:52:06 +00:00
Rico Tzschichholz
cf943627e2 build: Make sure built-sources are introspected as needed 2013-10-31 00:09:15 +01:00
Rico Tzschichholz
96543cb009 build: Do not ship generated source-files in tarball 2013-10-30 23:42:12 +01:00
Florian Müllner
fbb2207f8c Fix typo 2013-10-30 17:14:16 +01:00
Florian Müllner
cce8a4341b Bump version to 3.11.1
Update NEWS.
2013-10-30 16:34:59 +01:00
Jasper St. Pierre
b82784ee46 display: Don't focus the no-focus-window when sending WM_TAKE_FOCUS to a globally active window
Clients like on-screen keyboards try not to take focus when the user clicks
on their window by setting the Input hint to false. However, due to GTK+ and
GDK bugs, the public API for setting the Input hint to false don't remove
WM_TAKE_FOCUS from WM_PROTOCOLS, unintentionally putting them into Globally
Active mode.

These clients also expect that since they don't want to take focus, they want
the focus to remain on the existing window. In this case, for clients like
on-screen keyboards, it's so they can send synthesized keyboard events to the
focused window.

https://bugzilla.gnome.org/show_bug.cgi?id=710296
2013-10-29 16:26:00 -04:00
Magdalen Berns
6b8959916c Mutter-Wayland: fix build failure
Bug https://bugzilla.gnome.org/show_bug.cgi?id=710565
2013-10-29 13:04:48 +00:00
Rico Tzschichholz
ecc1830296 meta-cursor-tracker: Add missing include of Xcursor.h 2013-10-29 11:39:02 +01:00
Reinout van Schouwen
497916aad7 Updated Dutch translation 2013-10-25 00:25:49 +02:00
Asad Mehmood
e171a31ac5 monitor: expose min-backlight-step
Expose min-backlight-step so that gnome-settings-daemon can
support backlights with less than 10 steps without mutter
normalizing the brightness back to its original value

https://bugzilla.gnome.org/show_bug.cgi?id=710380
2013-10-21 23:22:41 +02:00
Bastien Nocera
a9a10aaa20 MonitorConfig: Use new UPower API
The "changed" signal was removed. Use "notify" instead
to track just the lid-is-closed state.
2013-10-21 14:00:48 +02:00
A. Walton
656d079ffc screen: Name the guard window
So that extensons can recognize it, for the case where they
want to watch the window list.

https://bugzilla.gnome.org/show_bug.cgi?id=710346
2013-10-16 22:39:21 -04:00
Olav Vitters
d801f699af link mutter-wayland to mutter git repos 2013-10-16 15:37:48 +02:00
Jasper St. Pierre
89d01d2c17 core: Remove old unused methods 2013-10-16 01:29:56 -04:00
Jasper St. Pierre
ec284bc56a display: Fix whitespace / code style with autoraise stuff 2013-10-16 00:34:22 -04:00
Jasper St. Pierre
db2e00d41c keybindings: Remove unused function 2013-10-15 23:38:48 -04:00
Jasper St. Pierre
0a616c9fcb keybindings: Remove unused parameter from process_event 2013-10-15 23:38:47 -04:00
Jasper St. Pierre
fed3cd9e82 keybindings: Drop an unnecessary check 2013-10-15 23:38:47 -04:00
Jasper St. Pierre
d0d8a3d4ea window: Remove timestamp argument from change_workspace_by_index
It's unused, since we aren't activating the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=709776
2013-10-15 15:45:21 -04:00
Jasper St. Pierre
bdf5f88349 display: Deduplicate cursor loading code
Rather than do the cursor -> name translation ourselves in two different
places, use the facilities in libXcursor to do it for us. Put the shared
piece of code in meta-cursor-tracker, and use it for both server-side and
client-side cursor loading.
2013-10-15 15:39:58 -04:00
Giovanni Campagna
809dbe16d6 monitor-config: prevent assert that at least one output is connected
Apparently some connector technologies don't distinguish between
on and off, and there might be valid use cases for running without
any connected monitor.
In that case, just avoid any configuration at all.

https://bugzilla.gnome.org/show_bug.cgi?id=709009
2013-10-15 21:26:36 +02:00
29 changed files with 1353 additions and 1333 deletions

View File

@@ -8,3 +8,5 @@ EXTRA_DIST = HACKING MAINTAINERS rationales.txt
DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

43
NEWS
View File

@@ -1,35 +1,26 @@
3.10.3 3.11.2
======
* xrandr: Use "hotplug_mode_update" property [Marc-André; #711216]
* Don't focus the no-focus-window for globally active windows [Jasper; #710296]
* Fix window group paint volume [Owen; #719669]
* Fix checks for KeyPress/ButtonPress [Jasper; #720545]
* Fix problems with focus tracking [Owen; #720558]
* Don't leave focus on windows that are being unmanaged [Owen; #711618]
* Reduce server grabs [Daniel; #721345, #721709]
Contributors:
Daniel Drake, Marc-André Lureau, Jasper St. Pierre, Owen W. Taylor
Translations:
甘露(Gan Lu) [zh_CN]
3.10.2
====== ======
* Fix resize operations using mouse-button-modifier [Lionel; #710251] * Fix resize operations using mouse-button-modifier [Lionel; #710251]
* Misc. fixes and cleanups [Jasper, Rico, Florian; #711731]
Contributors: Contributors:
Lionel Landwerlin Lionel Landwerlin, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
3.11.1
======
* Don't require at least one output device to be connected [Giovanni; #709009]
* Name the guard window [Andrew; #710346]
* Use new UPower API [Bastien]
* Expose min-backlight-step [Asad; #710380]
* Don't focus the no-focus-window for globally active windows [Jasper; #710296]
* Misc. fixes and cleanups [Jasper, Rico, Olav, Magdalen; #709776]
Contributors:
Magdalen Berns, Giovanni Campagna, Asad Mehmood, Bastien Nocera,
Jasper St. Pierre, Rico Tzschichholz, Olav Vitters, Andrew Walton
Translations: Translations:
Efstathios Iosifidis [el], Reinout van Schouwen [nl] Reinout van Schouwen [nl]
3.10.1.1
========
* Don't assert that at least one output is connected [Giovanni; #709009]
Contributors:
Giovanni Campagna
3.10.1 3.10.1
====== ======

View File

@@ -1,8 +1,9 @@
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_CONFIG_MACRO_DIR([m4])
m4_define([mutter_major_version], [3]) m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [10]) m4_define([mutter_minor_version], [11])
m4_define([mutter_micro_version], [3]) m4_define([mutter_micro_version], [2])
m4_define([mutter_version], m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version]) [mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -76,7 +77,7 @@ MUTTER_PC_MODULES="
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0 xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
$CLUTTER_PACKAGE >= 1.15.90 $CLUTTER_PACKAGE >= 1.15.90
cogl-1.0 >= 1.15.6 cogl-1.0 >= 1.15.6
upower-glib > 0.9.11 upower-glib >= 0.99.0
gnome-desktop-3.0 gnome-desktop-3.0
" "

View File

@@ -49,8 +49,8 @@ FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change. # Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/*.h HFILE_GLOB=$(top_srcdir)/src/*/*.h
CFILE_GLOB=$(top_srcdir)/src/*.c CFILE_GLOB=$(top_srcdir)/src/*/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR # Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h

View File

@@ -207,7 +207,6 @@ meta_key_binding_get_modifiers
meta_key_binding_get_mask meta_key_binding_get_mask
meta_key_binding_is_builtin meta_key_binding_is_builtin
meta_keybindings_set_custom_handler meta_keybindings_set_custom_handler
meta_keybindings_switch_window
meta_screen_ungrab_all_keys meta_screen_ungrab_all_keys
meta_screen_grab_all_keys meta_screen_grab_all_keys
</SECTION> </SECTION>

View File

@@ -21,6 +21,7 @@ environment.</description>
--> -->
<mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-shell-list" /> <mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-shell-list" />
<download-page rdf:resource="http://download.gnome.org/sources/mutter/" /> <download-page rdf:resource="http://download.gnome.org/sources/mutter/" />
<download-page rdf:resource="http://download.gnome.org/sources/mutter-wayland/" />
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=mutter" /> <bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=mutter" />
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" /> <category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />

664
po/el.po

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mutter\n" "Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-10-25 00:15+0200\n" "POT-Creation-Date: 2013-10-25 00:25+0200\n"
"PO-Revision-Date: 2013-10-25 00:23+0200\n" "PO-Revision-Date: 2013-10-25 00:23+0200\n"
"Last-Translator: Reinout van Schouwen <reinouts@gnome.org>\n" "Last-Translator: Reinout van Schouwen <reinouts@gnome.org>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
@@ -256,12 +256,12 @@ msgstr "_Wachten"
msgid "_Force Quit" msgid "_Force Quit"
msgstr "Ge_forceerd afsluiten" msgstr "Ge_forceerd afsluiten"
#: ../src/core/display.c:422 #: ../src/core/display.c:421
#, c-format #, c-format
msgid "Missing %s extension required for compositing" msgid "Missing %s extension required for compositing"
msgstr "Benodigde extensie %s voor compositing ontbreekt" msgstr "Benodigde extensie %s voor compositing ontbreekt"
#: ../src/core/display.c:514 #: ../src/core/display.c:513
#, c-format #, c-format
msgid "Failed to open X Window System display '%s'\n" msgid "Failed to open X Window System display '%s'\n"
msgstr "Openen van X Window System display %s mislukt\n" msgstr "Openen van X Window System display %s mislukt\n"
@@ -389,12 +389,12 @@ msgstr ""
msgid "Workspace %d" msgid "Workspace %d"
msgstr "Werkblad %d" msgstr "Werkblad %d"
#: ../src/core/screen.c:537 #: ../src/core/screen.c:540
#, c-format #, c-format
msgid "Screen %d on display '%s' is invalid\n" msgid "Screen %d on display '%s' is invalid\n"
msgstr "Scherm %d op display '%s' is ongeldig\n" msgstr "Scherm %d op display '%s' is ongeldig\n"
#: ../src/core/screen.c:553 #: ../src/core/screen.c:556
#, c-format #, c-format
msgid "" msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --" "Screen %d on display \"%s\" already has a window manager; try using the --"
@@ -403,19 +403,19 @@ msgstr ""
"Scherm %d op display %s heeft al een window manager; probeer de optie: --" "Scherm %d op display %s heeft al een window manager; probeer de optie: --"
"replace te gebruiken om de huidige window manager te vervangen.\n" "replace te gebruiken om de huidige window manager te vervangen.\n"
#: ../src/core/screen.c:580 #: ../src/core/screen.c:583
#, c-format #, c-format
msgid "" msgid ""
"Could not acquire window manager selection on screen %d display \"%s\"\n" "Could not acquire window manager selection on screen %d display \"%s\"\n"
msgstr "" msgstr ""
"Kon window manager-selectie niet verkrijgen op scherm %d display %s\n" "Kon window manager-selectie niet verkrijgen op scherm %d display %s\n"
#: ../src/core/screen.c:658 #: ../src/core/screen.c:661
#, c-format #, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n" msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Scherm %d op display %s heeft al een window manager\n" msgstr "Scherm %d op display %s heeft al een window manager\n"
#: ../src/core/screen.c:850 #: ../src/core/screen.c:853
#, c-format #, c-format
msgid "Could not release screen %d on display \"%s\"\n" msgid "Could not release screen %d on display \"%s\"\n"
msgstr "Kon scherm %d op display %s niet vrijmaken\n" msgstr "Kon scherm %d op display %s niet vrijmaken\n"
@@ -511,7 +511,7 @@ msgid "Window manager error: "
msgstr "Fout van vensterbeheer:" msgstr "Fout van vensterbeheer:"
#. first time through #. first time through
#: ../src/core/window.c:7515 #: ../src/core/window.c:7510
#, c-format #, c-format
msgid "" msgid ""
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER " "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
@@ -527,7 +527,7 @@ msgstr ""
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain #. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
#. * about these apps but make them work. #. * about these apps but make them work.
#. #.
#: ../src/core/window.c:8345 #: ../src/core/window.c:8340
#, c-format #, c-format
msgid "" msgid ""
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size " "Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
@@ -683,9 +683,9 @@ msgid ""
"the focus will not be changed immediately when entering a window, but only " "the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving." "after the pointer stops moving."
msgstr "" msgstr ""
"Indien op true ingesteld en de aandachtsmodus is ofwel sloppy of mouse, " "Indien op true ingesteld en de aandachtsmodus is ofwel sloppy of "
"dan zal de aandacht niet direct veranderd worden bij het binnengaan van een " "mouse, dan zal de aandacht niet direct veranderd worden bij het binnengaan "
"venster, maar slechts wanneer de muispijl stopt met bewegen." "van een venster, maar slechts wanneer de muispijl stopt met bewegen."
#: ../src/org.gnome.mutter.gschema.xml.in.h:15 #: ../src/org.gnome.mutter.gschema.xml.in.h:15
msgid "Draggable border width" msgid "Draggable border width"
@@ -697,8 +697,8 @@ msgid ""
"not enough, invisible borders will be added to meet this value." "not enough, invisible borders will be added to meet this value."
msgstr "" msgstr ""
"Het totaal aantal sleepbare randen. Als de zichtbare randen in het thema " "Het totaal aantal sleepbare randen. Als de zichtbare randen in het thema "
"onvoldoende zijn, worden onzichtbare randen toegevoegd om deze waarde " "onvoldoende zijn, worden onzichtbare randen toegevoegd om deze waarde te "
"te bereiken." "bereiken."
#: ../src/org.gnome.mutter.gschema.xml.in.h:17 #: ../src/org.gnome.mutter.gschema.xml.in.h:17
msgid "Auto maximize nearly monitor sized windows" msgid "Auto maximize nearly monitor sized windows"
@@ -968,8 +968,8 @@ msgid ""
"GTK custom color specification must have color name and fallback in " "GTK custom color specification must have color name and fallback in "
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\"" "parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
msgstr "" msgstr ""
"Aangepaste GTK-kleurspecificatie moet een kleurnaam en terugvaloptie " "Aangepaste GTK-kleurspecificatie moet een kleurnaam en terugvaloptie hebben "
"hebben tussen haakjes, dus: gtk:custom(foo,bar); kon %s niet verwerken" "tussen haakjes, dus: gtk:custom(foo,bar); kon %s niet verwerken"
#: ../src/ui/theme.c:1219 #: ../src/ui/theme.c:1219
#, c-format #, c-format
@@ -977,8 +977,8 @@ msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-" "Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid" "_ are valid"
msgstr "" msgstr ""
"Ongeldig teken %c in color_name-parameter van gtk:custom, alleen A-Za-z0-9-_ " "Ongeldig teken %c in color_name-parameter van gtk:custom, alleen A-Za-z0-9-"
"zijn geldig" "_ zijn geldig"
#: ../src/ui/theme.c:1233 #: ../src/ui/theme.c:1233
#, c-format #, c-format
@@ -986,8 +986,8 @@ msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not " "Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format" "fit the format"
msgstr "" msgstr ""
"Gtk:custom-formaat is gtk:custom(color_name,fallback), %s voldoet " "Gtk:custom-formaat is gtk:custom(color_name,fallback), %s voldoet niet "
"niet aan dit formaat" "aan dit formaat"
#: ../src/ui/theme.c:1278 #: ../src/ui/theme.c:1278
#, c-format #, c-format

File diff suppressed because it is too large Load Diff

View File

@@ -168,7 +168,9 @@ libmutter_la_SOURCES = \
ui/theme.c \ ui/theme.c \
meta/theme.h \ meta/theme.h \
ui/theme-private.h \ ui/theme-private.h \
ui/ui.c \ ui/ui.c
nodist_libmutter_la_SOURCES = \
$(mutter_built_sources) $(mutter_built_sources)
libmutter_la_LDFLAGS = -no-undefined libmutter_la_LDFLAGS = -no-undefined
@@ -249,7 +251,7 @@ Meta-$(api_version).gir: libmutter.la
@META_GIR@_FILES = \ @META_GIR@_FILES = \
mutter-enum-types.h \ mutter-enum-types.h \
$(libmutterinclude_base_headers) \ $(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_la_SOURCES)) $(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES))
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error @META_GIR@_SCANNERFLAGS = --warn-all --warn-error
endif endif

View File

@@ -685,15 +685,6 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
clutter_actor_add_child (info->stage, info->window_group); clutter_actor_add_child (info->stage, info->window_group);
clutter_actor_add_child (info->stage, info->top_window_group); clutter_actor_add_child (info->stage, info->top_window_group);
info->plugin_mgr = meta_plugin_manager_new (screen);
/*
* Delay the creation of the overlay window as long as we can, to avoid
* blanking out the screen. This means that during the plugin loading, the
* overlay window is not accessible; if the plugin needs to access it
* directly, it should hook into the "show" signal on stage, and do
* its stuff there.
*/
info->output = get_output_window (screen); info->output = get_output_window (screen);
XReparentWindow (xdisplay, xwin, info->output, 0, 0); XReparentWindow (xdisplay, xwin, info->output, 0, 0);
@@ -714,6 +705,8 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
info->pending_input_region = None; info->pending_input_region = None;
} }
info->plugin_mgr = meta_plugin_manager_new (screen);
/* Map overlay window before redirecting windows offscreen so we catch their /* Map overlay window before redirecting windows offscreen so we catch their
* contents until we show the stage. * contents until we show the stage.
*/ */

View File

@@ -277,30 +277,11 @@ meta_window_group_paint (ClutterActor *actor)
} }
} }
/* Adapted from clutter_actor_update_default_paint_volume() */
static gboolean static gboolean
meta_window_group_get_paint_volume (ClutterActor *self, meta_window_group_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume) ClutterPaintVolume *volume)
{ {
ClutterActorIter iter; return clutter_paint_volume_set_from_allocation (volume, actor);
ClutterActor *child;
clutter_actor_iter_init (&iter, self);
while (clutter_actor_iter_next (&iter, &child))
{
const ClutterPaintVolume *child_volume;
if (!CLUTTER_ACTOR_IS_MAPPED (child))
continue;
child_volume = clutter_actor_get_transformed_paint_volume (child, self);
if (child_volume == NULL)
return FALSE;
clutter_paint_volume_union (volume, child_volume);
}
return TRUE;
} }
static void static void

View File

@@ -469,26 +469,6 @@ meta_core_change_workspace (Display *xdisplay,
new_workspace)); new_workspace));
} }
int
meta_core_get_num_workspaces (Screen *xscreen)
{
MetaScreen *screen;
screen = meta_screen_for_x_screen (xscreen);
return meta_screen_get_n_workspaces (screen);
}
int
meta_core_get_active_workspace (Screen *xscreen)
{
MetaScreen *screen;
screen = meta_screen_for_x_screen (xscreen);
return meta_workspace_index (screen->active_workspace);
}
void void
meta_core_show_window_menu (Display *xdisplay, meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow, Window frame_xwindow,

View File

@@ -153,8 +153,6 @@ void meta_core_change_workspace (Display *xdisplay,
Window frame_xwindow, Window frame_xwindow,
int new_workspace); int new_workspace);
int meta_core_get_num_workspaces (Screen *xscreen);
int meta_core_get_active_workspace (Screen *xscreen);
int meta_core_get_frame_workspace (Display *xdisplay, int meta_core_get_frame_workspace (Display *xdisplay,
Window frame_xwindow); Window frame_xwindow);
const char* meta_core_get_workspace_name_with_index (Display *xdisplay, const char* meta_core_get_workspace_name_with_index (Display *xdisplay,

View File

@@ -138,14 +138,6 @@ struct _MetaDisplay
*/ */
guint allow_terminal_deactivation : 1; guint allow_terminal_deactivation : 1;
/* If true, server->focus_serial refers to us changing the focus; in
* this case, we can ignore focus events that have exactly focus_serial,
* since we take care to make another request immediately afterwards.
* But if focus is being changed by another client, we have to accept
* multiple events with the same serial.
*/
guint focused_by_us : 1;
guint static_gravity_works : 1; guint static_gravity_works : 1;
/*< private-ish >*/ /*< private-ish >*/

View File

@@ -51,7 +51,6 @@
#include <meta/compositor.h> #include <meta/compositor.h>
#include <meta/compositor-mutter.h> #include <meta/compositor-mutter.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/cursorfont.h>
#include "mutter-enum-types.h" #include "mutter-enum-types.h"
#include "meta-idle-monitor-private.h" #include "meta-idle-monitor-private.h"
@@ -925,6 +924,8 @@ meta_display_open (void)
enable_compositor (the_display); enable_compositor (the_display);
meta_display_grab (the_display);
/* Now manage all existing windows */ /* Now manage all existing windows */
tmp = the_display->screens; tmp = the_display->screens;
while (tmp != NULL) while (tmp != NULL)
@@ -976,6 +977,8 @@ meta_display_open (void)
meta_idle_monitor_init_dbus (); meta_idle_monitor_init_dbus ();
meta_display_ungrab (the_display);
/* Done opening new display */ /* Done opening new display */
the_display->display_opening = FALSE; the_display->display_opening = FALSE;
@@ -1220,18 +1223,7 @@ meta_display_screen_for_x_screen (MetaDisplay *display,
return NULL; return NULL;
} }
/* Grab/ungrab routines taken from fvwm. /* Grab/ungrab routines taken from fvwm */
* Calling this function will cause X to ignore all other clients until
* you ungrab. This may not be quite as bad as it sounds, yet there is
* agreement that avoiding server grabs except when they are clearly needed
* is a good thing.
*
* If you do use such grabs, please clearly explain the necessity for their
* usage in a comment. Try to keep their scope extremely limited. In
* particular, try to avoid emitting any signals or notifications while
* a grab is active (if the signal receiver tries to block on an X request
* from another client at this point, you will have a deadlock).
*/
void void
meta_display_grab (MetaDisplay *display) meta_display_grab (MetaDisplay *display)
{ {
@@ -1646,7 +1638,8 @@ window_raise_with_delay_callback (void *data)
static void static void
meta_display_mouse_mode_focus (MetaDisplay *display, meta_display_mouse_mode_focus (MetaDisplay *display,
MetaWindow *window, MetaWindow *window,
guint32 timestamp) { guint32 timestamp)
{
if (window->type != META_WINDOW_DESKTOP) if (window->type != META_WINDOW_DESKTOP)
{ {
meta_topic (META_DEBUG_FOCUS, meta_topic (META_DEBUG_FOCUS,
@@ -1685,7 +1678,8 @@ meta_display_mouse_mode_focus (MetaDisplay *display,
} }
static gboolean static gboolean
window_focus_on_pointer_rest_callback (gpointer data) { window_focus_on_pointer_rest_callback (gpointer data)
{
MetaFocusData *focus_data; MetaFocusData *focus_data;
MetaDisplay *display; MetaDisplay *display;
MetaScreen *screen; MetaScreen *screen;
@@ -1730,9 +1724,9 @@ window_focus_on_pointer_rest_callback (gpointer data) {
goto out; goto out;
window = window =
meta_stack_get_default_focus_window_at_point (screen->stack, meta_stack_get_default_focus_window_at_point (screen->stack,
screen->active_workspace, screen->active_workspace,
None, root_x, root_y); None, root_x, root_y);
if (window == NULL) if (window == NULL)
goto out; goto out;
@@ -1740,7 +1734,7 @@ window_focus_on_pointer_rest_callback (gpointer data) {
timestamp = meta_display_get_current_time_roundtrip (display); timestamp = meta_display_get_current_time_roundtrip (display);
meta_display_mouse_mode_focus (display, window, timestamp); meta_display_mouse_mode_focus (display, window, timestamp);
out: out:
display->focus_timeout_id = 0; display->focus_timeout_id = 0;
return FALSE; return FALSE;
} }
@@ -1897,11 +1891,9 @@ static void
update_focus_window (MetaDisplay *display, update_focus_window (MetaDisplay *display,
MetaWindow *window, MetaWindow *window,
Window xwindow, Window xwindow,
gulong serial, gulong serial)
gboolean focused_by_us)
{ {
display->focus_serial = serial; display->focus_serial = serial;
display->focused_by_us = focused_by_us;
if (display->focus_xwindow == xwindow) if (display->focus_xwindow == xwindow)
return; return;
@@ -2012,8 +2004,7 @@ request_xserver_input_focus_change (MetaDisplay *display,
update_focus_window (display, update_focus_window (display,
meta_window, meta_window,
xwindow, xwindow,
serial, serial);
TRUE);
meta_error_trap_pop (display); meta_error_trap_pop (display);
@@ -2127,20 +2118,12 @@ handle_window_focus_event (MetaDisplay *display,
else else
g_return_if_reached (); g_return_if_reached ();
/* If display->focused_by_us, then the focus_serial will be used only if (display->server_focus_serial > display->focus_serial)
* for a focus change we made and have already accounted for.
* (See request_xserver_input_focus_change().) Otherwise, we can get
* multiple focus events with the same serial.
*/
if (display->server_focus_serial > display->focus_serial ||
(!display->focused_by_us &&
display->server_focus_serial == display->focus_serial))
{ {
update_focus_window (display, update_focus_window (display,
focus_window, focus_window,
focus_window ? focus_window->xwindow : None, focus_window ? focus_window->xwindow : None,
display->server_focus_serial, display->server_focus_serial);
FALSE);
} }
} }
@@ -2197,8 +2180,7 @@ event_callback (XEvent *event,
display->current_time = event_get_time (display, event); display->current_time = event_get_time (display, event);
display->monitor_cache_invalidated = TRUE; display->monitor_cache_invalidated = TRUE;
if (display->focused_by_us && if (event->xany.serial > display->focus_serial &&
event->xany.serial > display->focus_serial &&
display->focus_window && display->focus_window &&
display->focus_window->xwindow != display->server_focus_window) display->focus_window->xwindow != display->server_focus_window)
{ {
@@ -2207,8 +2189,7 @@ event_callback (XEvent *event,
update_focus_window (display, update_focus_window (display,
meta_display_lookup_x_window (display, display->server_focus_window), meta_display_lookup_x_window (display, display->server_focus_window),
display->server_focus_window, display->server_focus_window,
display->server_focus_serial, display->server_focus_serial);
FALSE);
} }
screen = meta_display_screen_for_root (display, event->xany.window); screen = meta_display_screen_for_root (display, event->xany.window);
@@ -2324,7 +2305,7 @@ event_callback (XEvent *event,
XIEnterEvent *enter_event = (XIEnterEvent *) input_event; XIEnterEvent *enter_event = (XIEnterEvent *) input_event;
if (window && !window->override_redirect && if (window && !window->override_redirect &&
((input_event->evtype == XI_KeyPress) || (input_event->evtype == XI_ButtonPress))) ((input_event->type == XI_KeyPress) || (input_event->type == XI_ButtonPress)))
{ {
if (CurrentTime == display->current_time) if (CurrentTime == display->current_time)
{ {
@@ -2794,14 +2775,14 @@ event_callback (XEvent *event,
&& meta_display_screen_for_root (display, event->xmap.event)) && meta_display_screen_for_root (display, event->xmap.event))
{ {
window = meta_window_new (display, event->xmap.window, window = meta_window_new (display, event->xmap.window,
FALSE, META_COMP_EFFECT_CREATE); FALSE);
} }
break; break;
case MapRequest: case MapRequest:
if (window == NULL) if (window == NULL)
{ {
window = meta_window_new (display, event->xmaprequest.window, window = meta_window_new (display, event->xmaprequest.window,
FALSE, META_COMP_EFFECT_CREATE); FALSE);
} }
/* if frame was receiver it's some malicious send event or something */ /* if frame was receiver it's some malicious send event or something */
else if (!frame_was_receiver && window) else if (!frame_was_receiver && window)
@@ -3879,85 +3860,6 @@ meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display,
return is_a_no_focus_window; return is_a_no_focus_window;
} }
Cursor
meta_display_create_x_cursor (MetaDisplay *display,
MetaCursor cursor)
{
Cursor xcursor;
guint glyph = XC_num_glyphs;
const char *name = NULL;
switch (cursor)
{
case META_CURSOR_DEFAULT:
glyph = XC_left_ptr;
break;
case META_CURSOR_NORTH_RESIZE:
glyph = XC_top_side;
break;
case META_CURSOR_SOUTH_RESIZE:
glyph = XC_bottom_side;
break;
case META_CURSOR_WEST_RESIZE:
glyph = XC_left_side;
break;
case META_CURSOR_EAST_RESIZE:
glyph = XC_right_side;
break;
case META_CURSOR_SE_RESIZE:
glyph = XC_bottom_right_corner;
break;
case META_CURSOR_SW_RESIZE:
glyph = XC_bottom_left_corner;
break;
case META_CURSOR_NE_RESIZE:
glyph = XC_top_right_corner;
break;
case META_CURSOR_NW_RESIZE:
glyph = XC_top_left_corner;
break;
case META_CURSOR_MOVE_OR_RESIZE_WINDOW:
glyph = XC_fleur;
break;
case META_CURSOR_BUSY:
glyph = XC_watch;
break;
case META_CURSOR_DND_IN_DRAG:
name = "dnd-none";
break;
case META_CURSOR_DND_MOVE:
name = "dnd-move";
break;
case META_CURSOR_DND_COPY:
name = "dnd-copy";
break;
case META_CURSOR_DND_UNSUPPORTED_TARGET:
name = "dnd-none";
break;
case META_CURSOR_POINTING_HAND:
glyph = XC_hand2;
break;
case META_CURSOR_CROSSHAIR:
glyph = XC_crosshair;
break;
case META_CURSOR_IBEAM:
glyph = XC_xterm;
break;
default:
g_assert_not_reached ();
glyph = 0; /* silence compiler */
break;
}
if (name != NULL)
xcursor = XcursorLibraryLoadCursor (display->xdisplay, name);
else
xcursor = XCreateFontCursor (display->xdisplay, glyph);
return xcursor;
}
static Cursor static Cursor
xcursor_for_op (MetaDisplay *display, xcursor_for_op (MetaDisplay *display,
MetaGrabOp op) MetaGrabOp op)

View File

@@ -51,6 +51,9 @@ meta_window_ensure_frame (MetaWindow *window)
if (window->frame) if (window->frame)
return; return;
/* See comment below for why this is required. */
meta_display_grab (window->display);
frame = g_new (MetaFrame, 1); frame = g_new (MetaFrame, 1);
frame->window = window; frame->window = window;
@@ -113,6 +116,14 @@ meta_window_ensure_frame (MetaWindow *window)
meta_display_register_x_window (window->display, &frame->xwindow, window); meta_display_register_x_window (window->display, &frame->xwindow, window);
/* Reparent the client window; it may be destroyed,
* thus the error trap. We'll get a destroy notify later
* and free everything. Comment in FVWM source code says
* we need a server grab or the child can get its MapNotify
* before we've finished reparenting and getting the decoration
* window onscreen, so ensure_frame must be called with
* a grab.
*/
meta_error_trap_push (window->display); meta_error_trap_push (window->display);
if (window->mapped) if (window->mapped)
{ {
@@ -154,6 +165,8 @@ meta_window_ensure_frame (MetaWindow *window)
/* Move keybindings to frame instead of window */ /* Move keybindings to frame instead of window */
meta_window_grab_keys (window); meta_window_grab_keys (window);
meta_display_ungrab (window->display);
} }
void void

View File

@@ -1835,7 +1835,6 @@ invoke_handler_by_name (MetaDisplay *display,
invoke_handler (display, screen, handler, window, event, NULL); invoke_handler (display, screen, handler, window, event, NULL);
} }
/* now called from only one place, may be worth merging */
static gboolean static gboolean
process_event (MetaKeyBinding *bindings, process_event (MetaKeyBinding *bindings,
int n_bindings, int n_bindings,
@@ -1843,7 +1842,6 @@ process_event (MetaKeyBinding *bindings,
MetaScreen *screen, MetaScreen *screen,
MetaWindow *window, MetaWindow *window,
XIDeviceEvent *event, XIDeviceEvent *event,
KeySym keysym,
gboolean on_window) gboolean on_window)
{ {
int i; int i;
@@ -1861,7 +1859,6 @@ process_event (MetaKeyBinding *bindings,
MetaKeyHandler *handler = bindings[i].handler; MetaKeyHandler *handler = bindings[i].handler;
if ((!on_window && handler->flags & META_KEY_BINDING_PER_WINDOW) || if ((!on_window && handler->flags & META_KEY_BINDING_PER_WINDOW) ||
event->evtype != XI_KeyPress ||
bindings[i].keycode != event->detail || bindings[i].keycode != event->detail ||
((event->mods.effective & 0xff & ~(display->ignored_modifier_mask)) != ((event->mods.effective & 0xff & ~(display->ignored_modifier_mask)) !=
bindings[i].mask) || bindings[i].mask) ||
@@ -1928,7 +1925,7 @@ process_overlay_key (MetaDisplay *display,
*/ */
if (process_event (display->key_bindings, if (process_event (display->key_bindings,
display->n_key_bindings, display->n_key_bindings,
display, screen, NULL, event, keysym, display, screen, NULL, event,
FALSE)) FALSE))
{ {
/* As normally, after we've handled a global key /* As normally, after we've handled a global key
@@ -2192,7 +2189,7 @@ meta_display_process_key_event (MetaDisplay *display,
/* Do the normal keybindings */ /* Do the normal keybindings */
return process_event (display->key_bindings, return process_event (display->key_bindings,
display->n_key_bindings, display->n_key_bindings,
display, screen, window, event, keysym, display, screen, window, event,
!all_keys_grabbed && window); !all_keys_grabbed && window);
} }
@@ -4132,28 +4129,6 @@ meta_keybindings_set_custom_handler (const gchar *name,
return TRUE; return TRUE;
} }
/**
* meta_keybindings_switch_window: (skip)
* @display: a #MetaDisplay
* @screen: a #MetaScreen
* @event_window: a #MetaWindow
* @event: a #XIDeviceEvent
* @binding: a #MetaKeyBinding
*
*/
void
meta_keybindings_switch_window (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *event_window,
XIDeviceEvent *event,
MetaKeyBinding *binding)
{
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
do_choose_window (display, screen, event_window, event, binding,
backwards, FALSE);
}
static void static void
init_builtin_key_bindings (MetaDisplay *display) init_builtin_key_bindings (MetaDisplay *display)
{ {

View File

@@ -37,7 +37,9 @@
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <X11/cursorfont.h>
#include <X11/extensions/Xfixes.h> #include <X11/extensions/Xfixes.h>
#include <X11/Xcursor/Xcursor.h>
#include "meta-cursor-tracker-private.h" #include "meta-cursor-tracker-private.h"
#include "screen-private.h" #include "screen-private.h"
@@ -69,6 +71,106 @@ enum {
static guint signals[LAST_SIGNAL]; static guint signals[LAST_SIGNAL];
static void
translate_meta_cursor (MetaCursor cursor,
guint *glyph_out,
const char **name_out)
{
guint glyph = XC_num_glyphs;
const char *name = NULL;
switch (cursor)
{
case META_CURSOR_DEFAULT:
glyph = XC_left_ptr;
break;
case META_CURSOR_NORTH_RESIZE:
glyph = XC_top_side;
break;
case META_CURSOR_SOUTH_RESIZE:
glyph = XC_bottom_side;
break;
case META_CURSOR_WEST_RESIZE:
glyph = XC_left_side;
break;
case META_CURSOR_EAST_RESIZE:
glyph = XC_right_side;
break;
case META_CURSOR_SE_RESIZE:
glyph = XC_bottom_right_corner;
break;
case META_CURSOR_SW_RESIZE:
glyph = XC_bottom_left_corner;
break;
case META_CURSOR_NE_RESIZE:
glyph = XC_top_right_corner;
break;
case META_CURSOR_NW_RESIZE:
glyph = XC_top_left_corner;
break;
case META_CURSOR_MOVE_OR_RESIZE_WINDOW:
glyph = XC_fleur;
break;
case META_CURSOR_BUSY:
glyph = XC_watch;
break;
case META_CURSOR_DND_IN_DRAG:
name = "dnd-none";
break;
case META_CURSOR_DND_MOVE:
name = "dnd-move";
break;
case META_CURSOR_DND_COPY:
name = "dnd-copy";
break;
case META_CURSOR_DND_UNSUPPORTED_TARGET:
name = "dnd-none";
break;
case META_CURSOR_POINTING_HAND:
glyph = XC_hand2;
break;
case META_CURSOR_CROSSHAIR:
glyph = XC_crosshair;
break;
case META_CURSOR_IBEAM:
glyph = XC_xterm;
break;
default:
g_assert_not_reached ();
glyph = 0; /* silence compiler */
break;
}
*glyph_out = glyph;
*name_out = name;
}
static Cursor
load_cursor_on_server (MetaDisplay *display,
MetaCursor cursor)
{
Cursor xcursor;
guint glyph;
const char *name;
translate_meta_cursor (cursor, &glyph, &name);
if (name != NULL)
xcursor = XcursorLibraryLoadCursor (display->xdisplay, name);
else
xcursor = XCreateFontCursor (display->xdisplay, glyph);
return xcursor;
}
Cursor
meta_display_create_x_cursor (MetaDisplay *display,
MetaCursor cursor)
{
return load_cursor_on_server (display, cursor);
}
static void static void
meta_cursor_tracker_init (MetaCursorTracker *self) meta_cursor_tracker_init (MetaCursorTracker *self)
{ {

View File

@@ -99,8 +99,9 @@ static gboolean meta_monitor_config_assign_crtcs (MetaConfiguration *config,
GPtrArray *crtcs, GPtrArray *crtcs,
GPtrArray *outputs); GPtrArray *outputs);
static void power_client_changed_cb (UpClient *client, static void power_client_changed_cb (UpClient *client,
gpointer user_data); GParamSpec *pspec,
gpointer user_data);
static void static void
free_output_key (MetaOutputKey *key) free_output_key (MetaOutputKey *key)
@@ -232,7 +233,7 @@ meta_monitor_config_init (MetaMonitorConfig *self)
self->up_client = up_client_new (); self->up_client = up_client_new ();
self->lid_is_closed = up_client_get_lid_is_closed (self->up_client); self->lid_is_closed = up_client_get_lid_is_closed (self->up_client);
g_signal_connect_object (self->up_client, "changed", g_signal_connect_object (self->up_client, "notify::lid-is-closed",
G_CALLBACK (power_client_changed_cb), self, 0); G_CALLBACK (power_client_changed_cb), self, 0);
} }
@@ -816,22 +817,6 @@ meta_monitor_config_match_current (MetaMonitorConfig *self,
return ok; return ok;
} }
gboolean
meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager)
{
MetaOutput *outputs;
unsigned n_outputs;
unsigned int i;
outputs = meta_monitor_manager_get_outputs (manager, &n_outputs);
for (i = 0; i < n_outputs; i++)
if (outputs[i].hotplug_mode_update)
return TRUE;
return FALSE;
}
static MetaConfiguration * static MetaConfiguration *
meta_monitor_config_get_stored (MetaMonitorConfig *self, meta_monitor_config_get_stored (MetaMonitorConfig *self,
MetaOutput *outputs, MetaOutput *outputs,
@@ -1360,8 +1345,9 @@ turn_off_laptop_display (MetaMonitorConfig *self,
} }
static void static void
power_client_changed_cb (UpClient *client, power_client_changed_cb (UpClient *client,
gpointer user_data) GParamSpec *pspec,
gpointer user_data)
{ {
MetaMonitorManager *manager = meta_monitor_manager_get (); MetaMonitorManager *manager = meta_monitor_manager_get ();
MetaMonitorConfig *self = user_data; MetaMonitorConfig *self = user_data;

View File

@@ -116,9 +116,6 @@ struct _MetaOutput
*/ */
gboolean is_primary; gboolean is_primary;
gboolean is_presentation; gboolean is_presentation;
/* get a new preferred mode on hotplug events, to handle dynamic guest resizing */
gboolean hotplug_mode_update;
}; };
struct _MetaCRTC struct _MetaCRTC
@@ -386,7 +383,6 @@ void meta_output_info_free (MetaOutputInfo *info);
void meta_monitor_manager_free_output_array (MetaOutput *old_outputs, void meta_monitor_manager_free_output_array (MetaOutput *old_outputs,
int n_old_outputs); int n_old_outputs);
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
/* Returns true if transform causes width and height to be inverted /* Returns true if transform causes width and height to be inverted
This is true for the odd transforms in the enum */ This is true for the odd transforms in the enum */

View File

@@ -311,29 +311,6 @@ read_output_edid (MetaMonitorManagerXrandr *manager_xrandr,
return NULL; return NULL;
} }
static gboolean
output_get_hotplug_mode_update (MetaMonitorManagerXrandr *manager_xrandr,
XID output_id)
{
MetaDisplay *display = meta_get_display ();
XRRPropertyInfo *info;
gboolean result = FALSE;
meta_error_trap_push (display);
info = XRRQueryOutputProperty (manager_xrandr->xdisplay, output_id,
display->atom_hotplug_mode_update);
meta_error_trap_pop (display);
if (info)
{
result = TRUE;
XFree (info);
}
return result;
}
static void static void
meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager) meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
{ {
@@ -507,8 +484,6 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
meta_output->width_mm = output->mm_width; meta_output->width_mm = output->mm_width;
meta_output->height_mm = output->mm_height; meta_output->height_mm = output->mm_height;
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN; meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
meta_output->hotplug_mode_update =
output_get_hotplug_mode_update (manager_xrandr, meta_output->output_id);
meta_output->n_modes = output->nmode; meta_output->n_modes = output->nmode;
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes); meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
@@ -996,16 +971,6 @@ meta_monitor_manager_xrandr_set_crtc_gamma (MetaMonitorManager *manager,
XRRFreeGamma (gamma); XRRFreeGamma (gamma);
} }
static void
meta_monitor_manager_xrandr_rebuild_derived (MetaMonitorManager *manager)
{
/* This will be a no-op if the change was from our side, as
we already called it in the DBus method handler */
meta_monitor_config_update_current (manager->config, manager);
meta_monitor_manager_rebuild_derived (manager);
}
static gboolean static gboolean
meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManager *manager, meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManager *manager,
XEvent *event) XEvent *event)
@@ -1015,7 +980,6 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManager *manager,
MetaCRTC *old_crtcs; MetaCRTC *old_crtcs;
MetaMonitorMode *old_modes; MetaMonitorMode *old_modes;
int n_old_outputs; int n_old_outputs;
gboolean new_config;
if ((event->type - manager_xrandr->rr_event_base) != RRScreenChangeNotify) if ((event->type - manager_xrandr->rr_event_base) != RRScreenChangeNotify)
return FALSE; return FALSE;
@@ -1031,36 +995,31 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManager *manager,
manager->serial++; manager->serial++;
meta_monitor_manager_xrandr_read_current (manager); meta_monitor_manager_xrandr_read_current (manager);
new_config = manager_xrandr->resources->timestamp >= /* Check if the current intended configuration has the same outputs
manager_xrandr->resources->configTimestamp; as the new real one, or if the event is a result of an XRandR call.
if (meta_monitor_manager_has_hotplug_mode_update (manager)) If so, we can go straight to rebuild the logical config and tell
the outside world.
Otherwise, this event was caused by hotplug, so give a chance to
MetaMonitorConfig.
Note that we need to check both the timestamps and the list of
outputs, because the X server might emit spurious events with
new configTimestamps (bug 702804), and the driver may have
changed the EDID for some other reason (old broken qxl and vbox
drivers...).
*/
if (manager_xrandr->resources->timestamp >= manager_xrandr->resources->configTimestamp ||
meta_monitor_config_match_current (manager->config, manager))
{ {
/* Check if the current intended configuration is a result of an /* This will be a no-op if the change was from our side, as
XRandR call. Otherwise, hotplug_mode_update tells us to get we already called it in the DBus method handler */
a new preferred mode on hotplug events to handle dynamic meta_monitor_config_update_current (manager->config, manager);
guest resizing. */
if (new_config) meta_monitor_manager_rebuild_derived (manager);
meta_monitor_manager_xrandr_rebuild_derived (manager);
else
meta_monitor_config_make_default (manager->config, manager);
} }
else else
{ {
/* Check if the current intended configuration has the same outputs if (!meta_monitor_config_apply_stored (manager->config, manager))
as the new real one, or if the event is a result of an XRandR call.
If so, we can go straight to rebuild the logical config and tell
the outside world.
Otherwise, this event was caused by hotplug, so give a chance to
MetaMonitorConfig.
Note that we need to check both the timestamps and the list of
outputs, because the X server might emit spurious events with new
configTimestamps (bug 702804), and the driver may have changed
the EDID for some other reason (old qxl and vbox drivers). */
if (new_config || meta_monitor_config_match_current (manager->config, manager))
meta_monitor_manager_xrandr_rebuild_derived (manager);
else if (!meta_monitor_config_apply_stored (manager->config, manager))
meta_monitor_config_make_default (manager->config, manager); meta_monitor_config_make_default (manager->config, manager);
} }

View File

@@ -806,6 +806,9 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
g_variant_new_take_string (make_display_name (manager, output))); g_variant_new_take_string (make_display_name (manager, output)));
g_variant_builder_add (&properties, "{sv}", "backlight", g_variant_builder_add (&properties, "{sv}", "backlight",
g_variant_new_int32 (output->backlight)); g_variant_new_int32 (output->backlight));
g_variant_builder_add (&properties, "{sv}", "min-backlight-step",
g_variant_new_int32 ((output->backlight_max - output->backlight_min) ?
100 / (output->backlight_max - output->backlight_min) : -1));
g_variant_builder_add (&properties, "{sv}", "primary", g_variant_builder_add (&properties, "{sv}", "primary",
g_variant_new_boolean (output->is_primary)); g_variant_new_boolean (output->is_primary));
g_variant_builder_add (&properties, "{sv}", "presentation", g_variant_builder_add (&properties, "{sv}", "presentation",

View File

@@ -476,6 +476,9 @@ create_guard_window (Display *xdisplay, MetaScreen *screen)
CWEventMask|CWOverrideRedirect|CWBackPixel, CWEventMask|CWOverrideRedirect|CWBackPixel,
&attributes); &attributes);
/* https://bugzilla.gnome.org/show_bug.cgi?id=710346 */
XStoreName (xdisplay, guard_window, "mutter guard window");
{ {
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
@@ -856,9 +859,9 @@ meta_screen_free (MetaScreen *screen,
screen->wm_sn_selection_window); screen->wm_sn_selection_window);
if (screen->work_area_later != 0) if (screen->work_area_later != 0)
g_source_remove (screen->work_area_later); meta_later_remove (screen->work_area_later);
if (screen->check_fullscreen_later != 0) if (screen->check_fullscreen_later != 0)
g_source_remove (screen->check_fullscreen_later); meta_later_remove (screen->check_fullscreen_later);
if (screen->monitor_infos) if (screen->monitor_infos)
g_free (screen->monitor_infos); g_free (screen->monitor_infos);
@@ -877,31 +880,83 @@ meta_screen_free (MetaScreen *screen,
meta_display_ungrab (display); meta_display_ungrab (display);
} }
typedef struct
{
Window xwindow;
XWindowAttributes attrs;
} WindowInfo;
static GList *
list_windows (MetaScreen *screen)
{
Window ignored1, ignored2;
Window *children;
guint n_children, i;
GList *result;
XQueryTree (screen->display->xdisplay,
screen->xroot,
&ignored1, &ignored2, &children, &n_children);
result = NULL;
for (i = 0; i < n_children; ++i)
{
WindowInfo *info = g_new0 (WindowInfo, 1);
meta_error_trap_push_with_return (screen->display);
XGetWindowAttributes (screen->display->xdisplay,
children[i], &info->attrs);
if (meta_error_trap_pop_with_return (screen->display))
{
meta_verbose ("Failed to get attributes for window 0x%lx\n",
children[i]);
g_free (info);
}
else
{
info->xwindow = children[i];
}
result = g_list_prepend (result, info);
}
if (children)
XFree (children);
return g_list_reverse (result);
}
void void
meta_screen_manage_all_windows (MetaScreen *screen) meta_screen_manage_all_windows (MetaScreen *screen)
{ {
Window *_children; GList *windows;
Window *children; GList *list;
int n_children, i;
meta_display_grab (screen->display);
if (screen->guard_window == None) if (screen->guard_window == None)
screen->guard_window = create_guard_window (screen->display->xdisplay, screen->guard_window = create_guard_window (screen->display->xdisplay,
screen); screen);
windows = list_windows (screen);
meta_stack_freeze (screen->stack); meta_stack_freeze (screen->stack);
meta_stack_tracker_get_stack (screen->stack_tracker, &_children, &n_children); for (list = windows; list != NULL; list = list->next)
/* Copy the stack as it will be modified as part of the loop */
children = g_memdup (_children, sizeof (Window) * n_children);
for (i = 0; i < n_children; ++i)
{ {
meta_window_new (screen->display, children[i], TRUE, WindowInfo *info = list->data;
META_COMP_EFFECT_NONE);
}
g_free (children); meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
META_COMP_EFFECT_NONE,
&info->attrs);
}
meta_stack_thaw (screen->stack); meta_stack_thaw (screen->stack);
g_list_foreach (windows, (GFunc)g_free, NULL);
g_list_free (windows);
meta_display_ungrab (screen->display);
} }
/** /**

View File

@@ -484,8 +484,12 @@ struct _MetaWindowClass
MetaWindow* meta_window_new (MetaDisplay *display, MetaWindow* meta_window_new (MetaDisplay *display,
Window xwindow, Window xwindow,
gboolean must_be_viewable, gboolean must_be_viewable);
MetaCompEffect effect); MetaWindow* meta_window_new_with_attrs (MetaDisplay *display,
Window xwindow,
gboolean must_be_viewable,
MetaCompEffect effect,
XWindowAttributes *attrs);
void meta_window_unmanage (MetaWindow *window, void meta_window_unmanage (MetaWindow *window,
guint32 timestamp); guint32 timestamp);
void meta_window_calc_showing (MetaWindow *window); void meta_window_calc_showing (MetaWindow *window);

View File

@@ -659,6 +659,53 @@ maybe_leave_show_desktop_mode (MetaWindow *window)
} }
} }
MetaWindow*
meta_window_new (MetaDisplay *display,
Window xwindow,
gboolean must_be_viewable)
{
XWindowAttributes attrs;
MetaWindow *window;
meta_display_grab (display);
meta_error_trap_push (display); /* Push a trap over all of window
* creation, to reduce XSync() calls
*/
meta_error_trap_push_with_return (display);
if (XGetWindowAttributes (display->xdisplay,xwindow, &attrs))
{
if(meta_error_trap_pop_with_return (display) != Success)
{
meta_verbose ("Failed to get attributes for window 0x%lx\n",
xwindow);
meta_error_trap_pop (display);
meta_display_ungrab (display);
return NULL;
}
window = meta_window_new_with_attrs (display, xwindow,
must_be_viewable,
META_COMP_EFFECT_CREATE,
&attrs);
}
else
{
meta_error_trap_pop_with_return (display);
meta_verbose ("Failed to get attributes for window 0x%lx\n",
xwindow);
meta_error_trap_pop (display);
meta_display_ungrab (display);
return NULL;
}
meta_error_trap_pop (display);
meta_display_ungrab (display);
return window;
}
/* The MUTTER_WM_CLASS_FILTER environment variable is designed for /* The MUTTER_WM_CLASS_FILTER environment variable is designed for
* performance and regression testing environments where we want to do * performance and regression testing environments where we want to do
* tests with only a limited set of windows and ignore all other windows * tests with only a limited set of windows and ignore all other windows
@@ -769,12 +816,12 @@ meta_window_should_attach_to_parent (MetaWindow *window)
} }
MetaWindow* MetaWindow*
meta_window_new (MetaDisplay *display, meta_window_new_with_attrs (MetaDisplay *display,
Window xwindow, Window xwindow,
gboolean must_be_viewable, gboolean must_be_viewable,
MetaCompEffect effect) MetaCompEffect effect,
XWindowAttributes *attrs)
{ {
XWindowAttributes attrs;
MetaWindow *window; MetaWindow *window;
GSList *tmp; GSList *tmp;
MetaWorkspace *space; MetaWorkspace *space;
@@ -783,6 +830,8 @@ meta_window_new (MetaDisplay *display,
MetaMoveResizeFlags flags; MetaMoveResizeFlags flags;
MetaScreen *screen; MetaScreen *screen;
g_assert (attrs != NULL);
meta_verbose ("Attempting to manage 0x%lx\n", xwindow); meta_verbose ("Attempting to manage 0x%lx\n", xwindow);
if (meta_display_xwindow_is_a_no_focus_window (display, xwindow)) if (meta_display_xwindow_is_a_no_focus_window (display, xwindow))
@@ -792,28 +841,12 @@ meta_window_new (MetaDisplay *display,
return NULL; return NULL;
} }
meta_error_trap_push (display); /* Push a trap over all of window
* creation, to reduce XSync() calls
*/
/*
* This function executes without any server grabs held. This means that
* the window could have already gone away, or could go away at any point,
* so we must be careful with X error handling.
*/
if (!XGetWindowAttributes (display->xdisplay, xwindow, &attrs))
{
meta_verbose ("Failed to get attributes for window 0x%lx\n",
xwindow);
goto error;
}
screen = NULL; screen = NULL;
for (tmp = display->screens; tmp != NULL; tmp = tmp->next) for (tmp = display->screens; tmp != NULL; tmp = tmp->next)
{ {
MetaScreen *scr = tmp->data; MetaScreen *scr = tmp->data;
if (scr->xroot == attrs.root) if (scr->xroot == attrs->root)
{ {
screen = tmp->data; screen = tmp->data;
break; break;
@@ -823,14 +856,14 @@ meta_window_new (MetaDisplay *display,
g_assert (screen); g_assert (screen);
/* A black list of override redirect windows that we don't need to manage: */ /* A black list of override redirect windows that we don't need to manage: */
if (attrs.override_redirect && if (attrs->override_redirect &&
(xwindow == screen->no_focus_window || (xwindow == screen->no_focus_window ||
xwindow == screen->flash_window || xwindow == screen->flash_window ||
xwindow == screen->wm_sn_selection_window || xwindow == screen->wm_sn_selection_window ||
attrs.class == InputOnly || attrs->class == InputOnly ||
/* any windows created via meta_create_offscreen_window: */ /* any windows created via meta_create_offscreen_window: */
(attrs.x == -100 && attrs.y == -100 (attrs->x == -100 && attrs->y == -100
&& attrs.width == 1 && attrs.height == 1) || && attrs->width == 1 && attrs->height == 1) ||
xwindow == screen->wm_cm_selection_window || xwindow == screen->wm_cm_selection_window ||
xwindow == screen->guard_window || xwindow == screen->guard_window ||
(display->compositor && (display->compositor &&
@@ -840,28 +873,34 @@ meta_window_new (MetaDisplay *display,
) )
) { ) {
meta_verbose ("Not managing our own windows\n"); meta_verbose ("Not managing our own windows\n");
goto error; return NULL;
} }
if (maybe_filter_window (display, xwindow, must_be_viewable, &attrs)) if (maybe_filter_window (display, xwindow, must_be_viewable, attrs))
{ {
meta_verbose ("Not managing filtered window\n"); meta_verbose ("Not managing filtered window\n");
goto error; return NULL;
} }
meta_verbose ("must_be_viewable = %d attrs.map_state = %d (%s)\n", /* Grab server */
meta_display_grab (display);
meta_error_trap_push (display); /* Push a trap over all of window
* creation, to reduce XSync() calls
*/
meta_verbose ("must_be_viewable = %d attrs->map_state = %d (%s)\n",
must_be_viewable, must_be_viewable,
attrs.map_state, attrs->map_state,
(attrs.map_state == IsUnmapped) ? (attrs->map_state == IsUnmapped) ?
"IsUnmapped" : "IsUnmapped" :
(attrs.map_state == IsViewable) ? (attrs->map_state == IsViewable) ?
"IsViewable" : "IsViewable" :
(attrs.map_state == IsUnviewable) ? (attrs->map_state == IsUnviewable) ?
"IsUnviewable" : "IsUnviewable" :
"(unknown)"); "(unknown)");
existing_wm_state = WithdrawnState; existing_wm_state = WithdrawnState;
if (must_be_viewable && attrs.map_state != IsViewable) if (must_be_viewable && attrs->map_state != IsViewable)
{ {
/* Only manage if WM_STATE is IconicState or NormalState */ /* Only manage if WM_STATE is IconicState or NormalState */
gulong state; gulong state;
@@ -874,7 +913,9 @@ meta_window_new (MetaDisplay *display,
(state == IconicState || state == NormalState))) (state == IconicState || state == NormalState)))
{ {
meta_verbose ("Deciding not to manage unmapped or unviewable window 0x%lx\n", xwindow); meta_verbose ("Deciding not to manage unmapped or unviewable window 0x%lx\n", xwindow);
goto error; meta_error_trap_pop (display);
meta_display_ungrab (display);
return NULL;
} }
existing_wm_state = state; existing_wm_state = state;
@@ -882,26 +923,29 @@ meta_window_new (MetaDisplay *display,
wm_state_to_string (existing_wm_state)); wm_state_to_string (existing_wm_state));
} }
meta_error_trap_push_with_return (display);
/* /*
* XAddToSaveSet can only be called on windows created by a different client. * XAddToSaveSet can only be called on windows created by a different client.
* with Mutter we want to be able to create manageable windows from within * with Mutter we want to be able to create manageable windows from within
* the process (such as a dummy desktop window). As we do not want this * the process (such as a dummy desktop window), so we do not want this
* call failing to prevent the window from being managed, we call this * call failing to prevent the window from being managed -- wrap it in its
* before creating the return-checked error trap. * own error trap (we use the _with_return() version here to ensure that
* XSync() is done on the pop, otherwise the error will not get caught).
*/ */
XAddToSaveSet (display->xdisplay, xwindow);
meta_error_trap_push_with_return (display); meta_error_trap_push_with_return (display);
XAddToSaveSet (display->xdisplay, xwindow);
meta_error_trap_pop_with_return (display);
event_mask = PropertyChangeMask | ColormapChangeMask; event_mask = PropertyChangeMask | ColormapChangeMask;
if (attrs.override_redirect) if (attrs->override_redirect)
event_mask |= StructureNotifyMask; event_mask |= StructureNotifyMask;
/* If the window is from this client (a menu, say) we need to augment /* If the window is from this client (a menu, say) we need to augment
* the event mask, not replace it. For windows from other clients, * the event mask, not replace it. For windows from other clients,
* attrs.your_event_mask will be empty at this point. * attrs->your_event_mask will be empty at this point.
*/ */
XSelectInput (display->xdisplay, xwindow, attrs.your_event_mask | event_mask); XSelectInput (display->xdisplay, xwindow, attrs->your_event_mask | event_mask);
{ {
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
@@ -923,11 +967,11 @@ meta_window_new (MetaDisplay *display,
#endif #endif
/* Get rid of any borders */ /* Get rid of any borders */
if (attrs.border_width != 0) if (attrs->border_width != 0)
XSetWindowBorderWidth (display->xdisplay, xwindow, 0); XSetWindowBorderWidth (display->xdisplay, xwindow, 0);
/* Get rid of weird gravities */ /* Get rid of weird gravities */
if (attrs.win_gravity != NorthWestGravity) if (attrs->win_gravity != NorthWestGravity)
{ {
XSetWindowAttributes set_attrs; XSetWindowAttributes set_attrs;
@@ -943,7 +987,9 @@ meta_window_new (MetaDisplay *display,
{ {
meta_verbose ("Window 0x%lx disappeared just as we tried to manage it\n", meta_verbose ("Window 0x%lx disappeared just as we tried to manage it\n",
xwindow); xwindow);
goto error; meta_error_trap_pop (display);
meta_display_ungrab (display);
return NULL;
} }
@@ -972,22 +1018,22 @@ meta_window_new (MetaDisplay *display,
window->desc = g_strdup_printf ("0x%lx", window->xwindow); window->desc = g_strdup_printf ("0x%lx", window->xwindow);
window->override_redirect = attrs.override_redirect; window->override_redirect = attrs->override_redirect;
/* avoid tons of stack updates */ /* avoid tons of stack updates */
meta_stack_freeze (window->screen->stack); meta_stack_freeze (window->screen->stack);
window->rect.x = attrs.x; window->rect.x = attrs->x;
window->rect.y = attrs.y; window->rect.y = attrs->y;
window->rect.width = attrs.width; window->rect.width = attrs->width;
window->rect.height = attrs.height; window->rect.height = attrs->height;
/* And border width, size_hints are the "request" */ /* And border width, size_hints are the "request" */
window->border_width = attrs.border_width; window->border_width = attrs->border_width;
window->size_hints.x = attrs.x; window->size_hints.x = attrs->x;
window->size_hints.y = attrs.y; window->size_hints.y = attrs->y;
window->size_hints.width = attrs.width; window->size_hints.width = attrs->width;
window->size_hints.height = attrs.height; window->size_hints.height = attrs->height;
/* initialize the remaining size_hints as if size_hints.flags were zero */ /* initialize the remaining size_hints as if size_hints.flags were zero */
meta_set_normal_hints (window, NULL); meta_set_normal_hints (window, NULL);
@@ -995,9 +1041,9 @@ meta_window_new (MetaDisplay *display,
window->saved_rect = window->rect; window->saved_rect = window->rect;
window->user_rect = window->rect; window->user_rect = window->rect;
window->depth = attrs.depth; window->depth = attrs->depth;
window->xvisual = attrs.visual; window->xvisual = attrs->visual;
window->colormap = attrs.colormap; window->colormap = attrs->colormap;
window->title = NULL; window->title = NULL;
window->icon_name = NULL; window->icon_name = NULL;
@@ -1032,7 +1078,7 @@ meta_window_new (MetaDisplay *display,
window->minimized = FALSE; window->minimized = FALSE;
window->tab_unminimized = FALSE; window->tab_unminimized = FALSE;
window->iconic = FALSE; window->iconic = FALSE;
window->mapped = attrs.map_state != IsUnmapped; window->mapped = attrs->map_state != IsUnmapped;
window->hidden = FALSE; window->hidden = FALSE;
window->visible_to_compositor = FALSE; window->visible_to_compositor = FALSE;
window->pending_compositor_effect = effect; window->pending_compositor_effect = effect;
@@ -1437,6 +1483,7 @@ meta_window_new (MetaDisplay *display,
unminimize_window_and_all_transient_parents (window); unminimize_window_and_all_transient_parents (window);
meta_error_trap_pop (display); /* pop the XSync()-reducing trap */ meta_error_trap_pop (display); /* pop the XSync()-reducing trap */
meta_display_ungrab (display);
window->constructing = FALSE; window->constructing = FALSE;
@@ -1449,10 +1496,6 @@ meta_window_new (MetaDisplay *display,
g_signal_emit_by_name (window->display, "window-marked-urgent", window); g_signal_emit_by_name (window->display, "window-marked-urgent", window);
return window; return window;
error:
meta_error_trap_pop (display);
return NULL;
} }
/* This function should only be called from the end of meta_window_new_with_attrs () */ /* This function should only be called from the end of meta_window_new_with_attrs () */
@@ -2249,6 +2292,7 @@ idle_calc_showing (gpointer data)
GSList *should_hide; GSList *should_hide;
GSList *unplaced; GSList *unplaced;
GSList *displays; GSList *displays;
MetaWindow *first_window;
guint queue_index = GPOINTER_TO_INT (data); guint queue_index = GPOINTER_TO_INT (data);
g_return_val_if_fail (queue_pending[queue_index] != NULL, FALSE); g_return_val_if_fail (queue_pending[queue_index] != NULL, FALSE);
@@ -2301,6 +2345,10 @@ idle_calc_showing (gpointer data)
should_show = g_slist_sort (should_show, stackcmp); should_show = g_slist_sort (should_show, stackcmp);
should_show = g_slist_reverse (should_show); should_show = g_slist_reverse (should_show);
first_window = copy->data;
meta_display_grab (first_window->display);
tmp = unplaced; tmp = unplaced;
while (tmp != NULL) while (tmp != NULL)
{ {
@@ -2373,6 +2421,8 @@ idle_calc_showing (gpointer data)
} }
} }
meta_display_ungrab (first_window->display);
g_slist_free (copy); g_slist_free (copy);
g_slist_free (unplaced); g_slist_free (unplaced);
@@ -5840,8 +5890,7 @@ meta_window_focus (MetaWindow *window,
window->desc, window->input, window->take_focus); window->desc, window->input, window->take_focus);
if (window->display->grab_window && if (window->display->grab_window &&
window->display->grab_window->all_keys_grabbed && window->display->grab_window->all_keys_grabbed)
!window->display->grab_window->unmanaging)
{ {
meta_topic (META_DEBUG_FOCUS, meta_topic (META_DEBUG_FOCUS,
"Current focus window %s has global keygrab, not focusing window %s after all\n", "Current focus window %s has global keygrab, not focusing window %s after all\n",
@@ -5912,25 +5961,6 @@ meta_window_focus (MetaWindow *window,
"Sending WM_TAKE_FOCUS to %s since take_focus = true\n", "Sending WM_TAKE_FOCUS to %s since take_focus = true\n",
window->desc); window->desc);
if (!window->input)
{
/* The "Globally Active Input" window case, where the window
* doesn't want us to call XSetInputFocus on it, but does
* want us to send a WM_TAKE_FOCUS.
*
* Normally, we want to just leave the focus undisturbed until
* the window respnds to WM_TAKE_FOCUS, but if we're unmanaging
* the current focus window we *need* to move the focus away, so
* we focus the no_focus_window now (and set
* display->focus_window to that) before sending WM_TAKE_FOCUS.
*/
if (window->display->focus_window != NULL &&
window->display->focus_window->unmanaging)
meta_display_focus_the_no_focus_window (window->display,
window->screen,
timestamp);
}
meta_display_request_take_focus (window->display, meta_display_request_take_focus (window->display,
window, window,
timestamp); timestamp);
@@ -6533,8 +6563,7 @@ meta_window_property_notify (MetaWindow *window,
void void
meta_window_change_workspace_by_index (MetaWindow *window, meta_window_change_workspace_by_index (MetaWindow *window,
gint space_index, gint space_index,
gboolean append, gboolean append)
guint32 timestamp)
{ {
MetaWorkspace *workspace; MetaWorkspace *workspace;
MetaScreen *screen; MetaScreen *screen;
@@ -6553,11 +6582,7 @@ meta_window_change_workspace_by_index (MetaWindow *window,
meta_screen_get_workspace_by_index (screen, space_index); meta_screen_get_workspace_by_index (screen, space_index);
if (!workspace && append) if (!workspace && append)
{ workspace = meta_screen_append_new_workspace (screen, FALSE, CurrentTime);
if (timestamp == CurrentTime)
timestamp = meta_display_get_current_time_roundtrip (window->display);
workspace = meta_screen_append_new_workspace (screen, FALSE, timestamp);
}
if (workspace) if (workspace)
{ {

View File

@@ -81,7 +81,6 @@ item(TIMESTAMP)
item(VERSION) item(VERSION)
item(ATOM_PAIR) item(ATOM_PAIR)
item(BACKLIGHT) item(BACKLIGHT)
item(hotplug_mode_update)
/* Oddities: These are used, and we need atoms for them, /* Oddities: These are used, and we need atoms for them,
* but when we need all _NET_WM hints (i.e. when we're making * but when we need all _NET_WM hints (i.e. when we're making

View File

@@ -35,13 +35,6 @@ gboolean meta_keybindings_set_custom_handler (const gchar *name,
gpointer user_data, gpointer user_data,
GDestroyNotify free_data); GDestroyNotify free_data);
void meta_keybindings_switch_window (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *event_window,
XIDeviceEvent *event,
MetaKeyBinding *binding);
void meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp); void meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp);
gboolean meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp); gboolean meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp);
#endif #endif

View File

@@ -140,8 +140,7 @@ void meta_window_unset_demands_attention (MetaWindow *window);
const char* meta_window_get_startup_id (MetaWindow *window); const char* meta_window_get_startup_id (MetaWindow *window);
void meta_window_change_workspace_by_index (MetaWindow *window, void meta_window_change_workspace_by_index (MetaWindow *window,
gint space_index, gint space_index,
gboolean append, gboolean append);
guint32 timestamp);
void meta_window_change_workspace (MetaWindow *window, void meta_window_change_workspace (MetaWindow *window,
MetaWorkspace *workspace); MetaWorkspace *workspace);
GObject *meta_window_get_compositor_private (MetaWindow *window); GObject *meta_window_get_compositor_private (MetaWindow *window);