diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-04-01 19:47:44 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-04-01 19:47:44 +0200 |
| commit | b422431ec6557ea6973ccf3bb9647dc3be18083d (patch) | |
| tree | 047b0b69d5e10585ff3690638fa5bcd29c8d9ba6 | |
| parent | 4c08d409514f3b0ecde6577ff4abb20b241f4d1b (diff) | |
ForceQuitDialog: set shape area to ignore input events outside the actual dialog
(bzr r3740.4.6)
| -rw-r--r-- | decorations/DecorationsForceQuitDialog.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/decorations/DecorationsForceQuitDialog.cpp b/decorations/DecorationsForceQuitDialog.cpp index 582712d3d..657631c77 100644 --- a/decorations/DecorationsForceQuitDialog.cpp +++ b/decorations/DecorationsForceQuitDialog.cpp @@ -160,6 +160,17 @@ static void sheet_style_dialog_class_init(SheetStyleDialogClass* klass) return TRUE; }; + + GTK_WIDGET_CLASS(klass)->size_allocate = [] (GtkWidget* self, GtkAllocation* a) { + GTK_WIDGET_CLASS(sheet_style_dialog_parent_class)->size_allocate(self, a); + + int border = gtk_container_get_border_width(GTK_CONTAINER(self)); + cairo_rectangle_int_t rect = {border, border, a->width-border*2, a->height-border*2}; + + auto* region = cairo_region_create_rectangle(&rect); + gtk_widget_input_shape_combine_region(GTK_WIDGET(self), region); + cairo_region_destroy(region); + }; } // BOX Implementation |
