Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c7b8f26cad | ||
![]() |
8747b97ba3 |
9
NEWS
9
NEWS
@@ -1,12 +1,3 @@
|
|||||||
3.9.3
|
|
||||||
=====
|
|
||||||
* Ensure events are always reported to the grab window [Rui; #701219]
|
|
||||||
* Use new clutter_stage_set_paint_callback() function to prevent dropping
|
|
||||||
frames with frame synced toolkits [Owen; #698794]
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
Rui Matos, Owen W. Taylor
|
|
||||||
|
|
||||||
3.9.2
|
3.9.2
|
||||||
=====
|
=====
|
||||||
* Add meta_window_can_close() function [Jasper; #699269]
|
* Add meta_window_can_close() function [Jasper; #699269]
|
||||||
|
@@ -2,7 +2,7 @@ AC_PREREQ(2.50)
|
|||||||
|
|
||||||
m4_define([mutter_major_version], [3])
|
m4_define([mutter_major_version], [3])
|
||||||
m4_define([mutter_minor_version], [9])
|
m4_define([mutter_minor_version], [9])
|
||||||
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])
|
||||||
@@ -73,7 +73,7 @@ MUTTER_PC_MODULES="
|
|||||||
cairo >= 1.10.0
|
cairo >= 1.10.0
|
||||||
gsettings-desktop-schemas >= 3.7.3
|
gsettings-desktop-schemas >= 3.7.3
|
||||||
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
|
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
|
||||||
$CLUTTER_PACKAGE >= 1.14.3
|
$CLUTTER_PACKAGE >= 1.13.5
|
||||||
cogl-1.0 >= 1.13.3
|
cogl-1.0 >= 1.13.3
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@@ -391,6 +391,24 @@ meta_focus_stage_window (MetaScreen *screen,
|
|||||||
timestamp);
|
timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_stage_is_focused (MetaScreen *screen)
|
||||||
|
{
|
||||||
|
ClutterStage *stage;
|
||||||
|
Window window;
|
||||||
|
|
||||||
|
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
|
||||||
|
if (!stage)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
window = clutter_x11_get_stage_window (stage);
|
||||||
|
|
||||||
|
if (window == None)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return (screen->display->focus_xwindow == window);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_begin_modal_for_plugin (MetaScreen *screen,
|
meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||||
MetaPlugin *plugin,
|
MetaPlugin *plugin,
|
||||||
@@ -517,20 +535,20 @@ meta_check_end_modal (MetaScreen *screen)
|
|||||||
{
|
{
|
||||||
meta_end_modal_for_plugin (screen,
|
meta_end_modal_for_plugin (screen,
|
||||||
compositor->modal_plugin,
|
compositor->modal_plugin,
|
||||||
|
CurrentTime);
|
||||||
CurrentTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
after_stage_paint (ClutterStage *stage,
|
after_stage_paint (gpointer data)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
MetaCompScreen *info = (MetaCompScreen*) data;
|
MetaCompScreen *info = (MetaCompScreen*) data;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
for (l = info->windows; l; l = l->next)
|
for (l = info->windows; l; l = l->next)
|
||||||
meta_window_actor_post_paint (l->data);
|
meta_window_actor_post_paint (l->data);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -611,10 +629,9 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
|
|
||||||
info->stage = clutter_stage_new ();
|
info->stage = clutter_stage_new ();
|
||||||
|
|
||||||
clutter_stage_set_paint_callback (CLUTTER_STAGE (info->stage),
|
clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT,
|
||||||
after_stage_paint,
|
after_stage_paint,
|
||||||
info,
|
info, NULL);
|
||||||
NULL);
|
|
||||||
|
|
||||||
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);
|
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);
|
||||||
|
|
||||||
|
@@ -113,6 +113,9 @@ struct _MetaDisplay
|
|||||||
* or event that caused this.
|
* or event that caused this.
|
||||||
*/
|
*/
|
||||||
MetaWindow *focus_window;
|
MetaWindow *focus_window;
|
||||||
|
/* For windows we've focused that don't necessarily have an X window,
|
||||||
|
* like the no_focus_window or the stage X window. */
|
||||||
|
Window focus_xwindow;
|
||||||
gulong focus_serial;
|
gulong focus_serial;
|
||||||
|
|
||||||
/* last timestamp passed to XSetInputFocus */
|
/* last timestamp passed to XSetInputFocus */
|
||||||
|
@@ -1876,11 +1876,12 @@ get_input_event (MetaDisplay *display,
|
|||||||
static void
|
static void
|
||||||
update_focus_window (MetaDisplay *display,
|
update_focus_window (MetaDisplay *display,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
|
Window xwindow,
|
||||||
gulong serial)
|
gulong serial)
|
||||||
{
|
{
|
||||||
display->focus_serial = serial;
|
display->focus_serial = serial;
|
||||||
|
|
||||||
if (window == display->focus_window)
|
if (display->focus_xwindow == xwindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (display->focus_window)
|
if (display->focus_window)
|
||||||
@@ -1897,11 +1898,13 @@ update_focus_window (MetaDisplay *display,
|
|||||||
*/
|
*/
|
||||||
previous = display->focus_window;
|
previous = display->focus_window;
|
||||||
display->focus_window = NULL;
|
display->focus_window = NULL;
|
||||||
|
display->focus_xwindow = None;
|
||||||
|
|
||||||
meta_window_set_focused_internal (previous, FALSE);
|
meta_window_set_focused_internal (previous, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
display->focus_window = window;
|
display->focus_window = window;
|
||||||
|
display->focus_xwindow = xwindow;
|
||||||
|
|
||||||
if (display->focus_window)
|
if (display->focus_window)
|
||||||
{
|
{
|
||||||
@@ -1952,6 +1955,7 @@ request_xserver_input_focus_change (MetaDisplay *display,
|
|||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
MetaWindow *meta_window;
|
MetaWindow *meta_window;
|
||||||
|
gulong serial;
|
||||||
|
|
||||||
if (timestamp_too_old (display, ×tamp))
|
if (timestamp_too_old (display, ×tamp))
|
||||||
return;
|
return;
|
||||||
@@ -1959,14 +1963,40 @@ request_xserver_input_focus_change (MetaDisplay *display,
|
|||||||
meta_window = meta_display_lookup_x_window (display, xwindow);
|
meta_window = meta_display_lookup_x_window (display, xwindow);
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
update_focus_window (display,
|
|
||||||
meta_window,
|
/* In order for mutter to know that the focus request succeeded, we track
|
||||||
XNextRequest (display->xdisplay));
|
* the serial of the "focus request" we made, but if we take the serial
|
||||||
|
* of the XSetInputFocus request, then there's no way to determine the
|
||||||
|
* difference between focus events as a result of the SetInputFocus and
|
||||||
|
* focus events that other clients send around the same time. Ensure that
|
||||||
|
* we know which is which by making two requests that the server will
|
||||||
|
* process at the same time.
|
||||||
|
*/
|
||||||
|
meta_display_grab (display);
|
||||||
|
|
||||||
XSetInputFocus (display->xdisplay,
|
XSetInputFocus (display->xdisplay,
|
||||||
xwindow,
|
xwindow,
|
||||||
RevertToPointerRoot,
|
RevertToPointerRoot,
|
||||||
timestamp);
|
timestamp);
|
||||||
|
|
||||||
|
serial = XNextRequest (display->xdisplay);
|
||||||
|
|
||||||
|
{
|
||||||
|
unsigned long data[1] = { 0 };
|
||||||
|
|
||||||
|
XChangeProperty (display->xdisplay, display->timestamp_pinging_window,
|
||||||
|
display->atom__MUTTER_FOCUS_SET,
|
||||||
|
XA_CARDINAL,
|
||||||
|
32, PropModeReplace, (guchar*) data, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
meta_display_ungrab (display);
|
||||||
|
|
||||||
|
update_focus_window (display,
|
||||||
|
meta_window,
|
||||||
|
xwindow,
|
||||||
|
serial);
|
||||||
|
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
display->last_focus_time = timestamp;
|
display->last_focus_time = timestamp;
|
||||||
@@ -2081,7 +2111,9 @@ handle_window_focus_event (MetaDisplay *display,
|
|||||||
|
|
||||||
if (display->server_focus_serial >= display->focus_serial)
|
if (display->server_focus_serial >= display->focus_serial)
|
||||||
{
|
{
|
||||||
update_focus_window (display, focus_window,
|
update_focus_window (display,
|
||||||
|
focus_window,
|
||||||
|
focus_window ? focus_window->xwindow : None,
|
||||||
display->server_focus_serial);
|
display->server_focus_serial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2137,6 +2169,7 @@ event_callback (XEvent *event,
|
|||||||
display->focus_window->desc);
|
display->focus_window->desc);
|
||||||
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_serial);
|
display->server_focus_serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1480,7 +1480,7 @@ grab_keyboard (MetaDisplay *display,
|
|||||||
timestamp,
|
timestamp,
|
||||||
None,
|
None,
|
||||||
grab_mode, grab_mode,
|
grab_mode, grab_mode,
|
||||||
False, /* owner_events */
|
True, /* owner_events */
|
||||||
&mask);
|
&mask);
|
||||||
|
|
||||||
if (grab_status != Success)
|
if (grab_status != Success)
|
||||||
|
@@ -70,6 +70,7 @@ item(_GNOME_WM_KEYBINDINGS)
|
|||||||
item(_GNOME_PANEL_ACTION)
|
item(_GNOME_PANEL_ACTION)
|
||||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||||
item(_GNOME_PANEL_ACTION_RUN_DIALOG)
|
item(_GNOME_PANEL_ACTION_RUN_DIALOG)
|
||||||
|
item(_MUTTER_FOCUS_SET)
|
||||||
item(_MUTTER_SENTINEL)
|
item(_MUTTER_SENTINEL)
|
||||||
item(_MUTTER_VERSION)
|
item(_MUTTER_VERSION)
|
||||||
item(WM_CLIENT_MACHINE)
|
item(WM_CLIENT_MACHINE)
|
||||||
|
@@ -48,5 +48,6 @@ void meta_set_stage_input_region (MetaScreen *screen,
|
|||||||
void meta_empty_stage_input_region (MetaScreen *screen);
|
void meta_empty_stage_input_region (MetaScreen *screen);
|
||||||
void meta_focus_stage_window (MetaScreen *screen,
|
void meta_focus_stage_window (MetaScreen *screen,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
gboolean meta_stage_is_focused (MetaScreen *screen);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user