diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-04-02 11:36:54 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-04-02 11:36:54 +0200 |
| commit | fa6d5aa760ad9027ca0acc37aede3fb5d6502869 (patch) | |
| tree | 01621339d2cc7f9dc0493995dc0788c1780c879c | |
| parent | e7cc6babd869fd1bfaa88e016bda84476be9b09f (diff) | |
ForceQuitDialog: use the same window class of the real parent window
(bzr r3740.4.11)
| -rw-r--r-- | decorations/DecorationsForceQuitDialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/decorations/DecorationsForceQuitDialog.cpp b/decorations/DecorationsForceQuitDialog.cpp index 968981611..d7b93d79c 100644 --- a/decorations/DecorationsForceQuitDialog.cpp +++ b/decorations/DecorationsForceQuitDialog.cpp @@ -98,6 +98,8 @@ static void close_button_class_init(CloseButtonClass*); // Dialog implementation GtkWidget* sheet_style_dialog_new(Window parent_xid) { + auto* dpy = gdk_x11_get_default_xdisplay(); + auto* self = GTK_WINDOW(g_object_new(sheet_style_dialog_get_type(), nullptr)); gtk_window_set_skip_taskbar_hint(self, TRUE); gtk_window_set_skip_pager_hint(self, TRUE); @@ -107,6 +109,12 @@ GtkWidget* sheet_style_dialog_new(Window parent_xid) gtk_window_set_resizable(self, FALSE); gtk_window_set_title(self, "Force Quit Dialog"); + XClassHint parent_class = {nullptr, nullptr}; + XGetClassHint(dpy, parent_xid, &parent_class); + gtk_window_set_wmclass(self, parent_class.res_name, parent_class.res_class); + XFree(parent_class.res_class); + XFree(parent_class.res_name); + auto const& deco_style = decoration::Style::Get(); auto const& offset = deco_style->ShadowOffset(); int max_offset = std::max(std::abs(offset.x), std::abs(offset.y)); @@ -127,7 +135,6 @@ GtkWidget* sheet_style_dialog_new(Window parent_xid) gtk_widget_realize(GTK_WIDGET(self)); gdk_error_trap_push(); - auto* dpy = gdk_x11_get_default_xdisplay(); auto xid = gdk_x11_window_get_xid(gwindow); XSetTransientForHint(dpy, xid, parent_xid); XSync(dpy, False); |
