summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorIllia Danko <[email protected]>2016-10-07 23:58:41 +0300
committerraveit65 <[email protected]>2016-12-05 07:28:31 +0100
commit9a4b1e0bb71cd991cd1d86d4fb432377ba4f4eab (patch)
tree09d1d1858d2fc197c3e662952d945b6f521c7942 /src/ui
parentd2a4748d7df1c160eb4d7e15d898c2ae4219e88f (diff)
downloadmarco-9a4b1e0bb71cd991cd1d86d4fb432377ba4f4eab.tar.bz2
marco-9a4b1e0bb71cd991cd1d86d4fb432377ba4f4eab.tar.xz
Added functionality to disable display preselected tab window border
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/tabpopup.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c
index 3267a75c..8bbf91ef 100644
--- a/src/ui/tabpopup.c
+++ b/src/ui/tabpopup.c
@@ -60,7 +60,7 @@ struct _MetaTabPopup
GList *entries;
TabEntry *current_selected_entry;
GtkWidget *outline_window;
- gboolean outline;
+ gint border;
};
static GtkWidget* selectable_image_new (GdkPixbuf *pixbuf);
@@ -81,8 +81,11 @@ outline_window_draw (GtkWidget *widget,
popup = data;
- if (!popup->outline || popup->current_selected_entry == NULL)
+ if (popup->border & BORDER_OUTLINE_WORKSPACE ||
+ popup->current_selected_entry == NULL)
+ {
return FALSE;
+ }
te = popup->current_selected_entry;
@@ -214,7 +217,7 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
int screen_number,
int entry_count,
int width,
- gboolean outline)
+ gint border)
{
MetaTabPopup *popup;
int i, left, right, top, bottom;
@@ -256,12 +259,13 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
popup->current = NULL;
popup->entries = NULL;
popup->current_selected_entry = NULL;
- popup->outline = outline;
+ popup->border = border;
screen_width = gdk_screen_get_width (screen);
for (i = 0; i < entry_count; ++i)
{
- TabEntry* new_entry = tab_entry_new (&entries[i], screen_width, outline);
+ TabEntry* new_entry = tab_entry_new (&entries[i], screen_width,
+ border & BORDER_OUTLINE_WINDOW);
popup->entries = g_list_prepend (popup->entries, new_entry);
}
@@ -326,7 +330,7 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
/* just stick a widget here to avoid special cases */
image = gtk_label_new ("");
}
- else if (outline)
+ else if (border & BORDER_OUTLINE_TAB)
{
if (te->dimmed_icon)
{
@@ -451,7 +455,7 @@ display_entry (MetaTabPopup *popup,
if (popup->current_selected_entry)
{
- if (popup->outline)
+ if (popup->border & BORDER_OUTLINE_TAB)
unselect_image (popup->current_selected_entry->widget);
else
unselect_workspace (popup->current_selected_entry->widget);
@@ -459,12 +463,12 @@ display_entry (MetaTabPopup *popup,
gtk_label_set_markup (GTK_LABEL (popup->label), te->title);
- if (popup->outline)
+ if (popup->border & BORDER_OUTLINE_TAB)
select_image (te->widget);
else
select_workspace (te->widget);
- if (popup->outline)
+ if (popup->border & BORDER_OUTLINE_WINDOW)
{
window = gtk_widget_get_window (popup->outline_window);