mirror of
https://github.com/brl/mutter.git
synced 2025-08-06 16:44:40 +00:00
Make dialogs that Metacity shows follow focus-stealing-prevention
2004-08-25 Elijah Newren <newren@math.utah.edu> Make dialogs that Metacity shows follow focus-stealing-prevention conventions. (fixes one issue in #149028; see comments 47-54) * src/delete.c (delete_ping_reply_func, delete_ping_timeout_func): Make callback functions take a timestamp arg, (delete_ping_timeout_func): pass the timestamp to metacity-dialog * src/display.c (meta_display_ping_timeout): add a timestamp to the call to the ping_timeout_func, (meta_display_ping_window, process_pong_message): add a timestamp to the call to the ping_reply_func * src/display.h (MetaWindowPingFunc typedef): add a timestamp to this function typedef * src/keybindings.c (error_on_command): require a timestamp and pass the timestamp on to metacity-dialog, (handle_run_command): pass a timestamp to error_on_command * src/metacity-dialog.c (copy_of_gdk_x11_window_set_user_time): new function (temporary; only for use while using gtk+-2.4), (kill_window_question, warn_about_no_sm_support, error_about_command): make these functions take a timestamp and call copy_of_gdk_x11_window_set_user_time, (main): require the first two args to the program to be "--timestamp <timestamp>" * src/session.c (warn_about_lame_clients_and_finish_inter): pass a timestamp of 0 to metacity-dialog to prevent focus (it's a popup not generated by and kind of user request).
This commit is contained in:

committed by
Elijah Newren

parent
07c406cad9
commit
044d8999a3
@@ -3675,7 +3675,7 @@ meta_display_ping_timeout (gpointer data)
|
||||
ping_data->timestamp, ping_data->xwindow);
|
||||
|
||||
(* ping_data->ping_timeout_func) (ping_data->display, ping_data->xwindow,
|
||||
ping_data->user_data);
|
||||
ping_data->timestamp, ping_data->user_data);
|
||||
|
||||
ping_data->display->pending_pings =
|
||||
g_slist_remove (ping_data->display->pending_pings,
|
||||
@@ -3704,7 +3704,7 @@ meta_display_ping_window (MetaDisplay *display,
|
||||
if (!window->net_wm_ping)
|
||||
{
|
||||
if (ping_reply_func)
|
||||
(* ping_reply_func) (display, window->xwindow, user_data);
|
||||
(* ping_reply_func) (display, window->xwindow, timestamp, user_data);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -3830,7 +3830,9 @@ process_pong_message (MetaDisplay *display,
|
||||
}
|
||||
|
||||
/* Call callback */
|
||||
(* ping_data->ping_reply_func) (display, ping_data->xwindow,
|
||||
(* ping_data->ping_reply_func) (display,
|
||||
ping_data->xwindow,
|
||||
ping_data->timestamp,
|
||||
ping_data->user_data);
|
||||
|
||||
ping_data_free (ping_data);
|
||||
|
Reference in New Issue
Block a user