GNOME Bugzilla – Attachment 153373 Details for
Bug 605137
way to suppress "(as superuser)" message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to Metacity to implement this behaviour
0001-Ability-to-mark-a-window-not-to-receive-the-as-supe.patch (text/plain), 3.69 KB, created by
Thomas Thurman
on 2010-02-09 23:08 UTC
(
hide
)
Description:
Patch to Metacity to implement this behaviour
Filename:
MIME Type:
Creator:
Thomas Thurman
Created:
2010-02-09 23:08 UTC
Size:
3.69 KB
patch
obsolete
Status
:
none
accepted-commit_now
needs-work
accepted-commit_after_freeze
committed
rejected
reviewed
>From 4ba34e86949775d4481b7f1acc78c940f9116c98 Mon Sep 17 00:00:00 2001 >From: Thomas Thurman <tthurman@gnome.org> >Date: Tue, 9 Feb 2010 18:06:03 -0500 >Subject: [PATCH] Ability to mark a window not to receive the 'as superuser' message. Fixes #605137 > >--- > src/core/atomnames.h | 1 + > src/core/window-private.h | 3 +++ > src/core/window-props.c | 11 ++++++++++- > src/core/window.c | 4 +++- > 4 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/src/core/atomnames.h b/src/core/atomnames.h >index 43710f3..24cd14e 100644 >--- a/src/core/atomnames.h >+++ b/src/core/atomnames.h >@@ -63,6 +63,7 @@ item(_GNOME_PANEL_ACTION_MAIN_MENU) > item(_GNOME_PANEL_ACTION_RUN_DIALOG) > item(_METACITY_SENTINEL) > item(_METACITY_VERSION) >+item(_METACITY_HIDE_USERNAME) > item(WM_CLIENT_MACHINE) > item(MANAGER) > item(TARGETS) >diff --git a/src/core/window-private.h b/src/core/window-private.h >index da3fc52..7a8fa27 100644 >--- a/src/core/window-private.h >+++ b/src/core/window-private.h >@@ -307,6 +307,9 @@ struct _MetaWindow > /* if TRUE, application is buggy and SYNC resizing is turned off */ > guint disable_sync : 1; > >+ /* if TRUE, don't display "(as username)" for this window */ >+ guint disable_as_user : 1; >+ > /* Note: can be NULL */ > GSList *struts; > >diff --git a/src/core/window-props.c b/src/core/window-props.c >index 370c9c4..f3fdd1e 100644 >--- a/src/core/window-props.c >+++ b/src/core/window-props.c >@@ -389,7 +389,7 @@ set_title_text (MetaWindow *window, > title, window->wm_client_machine); > modified = TRUE; > } >- else if (window->net_wm_pid != -1) >+ else if (window->net_wm_pid != -1 && !window->disable_as_user) > { > /* We know the process which owns this window; perhaps we can > * find out the name of its owner (if it's not us). >@@ -544,6 +544,14 @@ reload_wm_name (MetaWindow *window, > } > > static void >+reload_disable_as_user (MetaWindow *window, >+ MetaPropValue *value, >+ gboolean initial) >+{ >+ window->disable_as_user = (value->type != META_PROP_VALUE_INVALID); >+} >+ >+static void > set_icon_title (MetaWindow *window, > const char *title) > { >@@ -1507,6 +1515,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display) > { XA_WM_HINTS, META_PROP_VALUE_WM_HINTS, reload_wm_hints }, > { XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for }, > { display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window }, >+ { display->atom__METACITY_HIDE_USERNAME, META_PROP_VALUE_CARDINAL, reload_disable_as_user }, > { 0 }, > }; > >diff --git a/src/core/window.c b/src/core/window.c >index 8149de3..13fd28e 100644 >--- a/src/core/window.c >+++ b/src/core/window.c >@@ -247,7 +247,7 @@ meta_window_new_with_attrs (MetaDisplay *display, > gulong existing_wm_state; > gulong event_mask; > MetaMoveResizeFlags flags; >-#define N_INITIAL_PROPS 19 >+#define N_INITIAL_PROPS 20 > Atom initial_props[N_INITIAL_PROPS]; > int i; > gboolean has_shape; >@@ -493,6 +493,7 @@ meta_window_new_with_attrs (MetaDisplay *display, > window->calc_placement = FALSE; > window->shaken_loose = FALSE; > window->have_focus_click_grab = FALSE; >+ window->disable_as_user = FALSE; > window->disable_sync = FALSE; > > window->unmaps_pending = 0; >@@ -574,6 +575,7 @@ meta_window_new_with_attrs (MetaDisplay *display, > i = 0; > initial_props[i++] = display->atom_WM_CLIENT_MACHINE; > initial_props[i++] = display->atom__NET_WM_PID; >+ initial_props[i++] = display->atom__METACITY_HIDE_USERNAME; > initial_props[i++] = display->atom__NET_WM_NAME; > initial_props[i++] = XA_WM_CLASS; > initial_props[i++] = XA_WM_NAME; >-- >1.6.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 605137
:
153372
| 153373