summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan.olivier@wanadoo.fr>2008-10-03 08:24:32 +0000
committerOlivier Fourdan <fourdan.olivier@wanadoo.fr>2008-10-03 08:24:32 +0000
commit7d6b8c72720a993bb33d0f4cad6fc920d6a4d23b (patch)
tree936a5994731908f9ceadf8b16a9c6d1da99748fe
parent180b1313bb13172b756b7a498aefd0ed5d90d19d (diff)
downloadxfwm4-7d6b8c72720a993bb33d0f4cad6fc920d6a4d23b.tar.gz
Make wire frame while cycling user configurable (Bug #4443)
(Old svn revision: 28020)
-rw-r--r--NEWS1
-rw-r--r--defaults/defaults5
-rw-r--r--settings-dialogs/tweaks-settings.c63
-rw-r--r--settings-dialogs/xfwm4-tweaks-dialog.glade15
-rw-r--r--src/cycle.c16
-rw-r--r--src/settings.c7
-rw-r--r--src/settings.h7
7 files changed, 77 insertions, 37 deletions
diff --git a/NEWS b/NEWS
index bf824b12d..d049215e3 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@
- Treat dialogs and utility windows as transients for group (bug #3102).
- Add support for shape input with XShape extension 1.1 (Bug #3092).
- Make the title button in the xfwm4 settings manager dragable (bug #3000).
+- Make wireframe while cycling user configurable (Bug #4443)
- Fix a misinterpretation of ICCCM about when to send a synthetic
configureNotify event (bug #2977).
- Add option to instruct xfwm4 not to bring window back on
diff --git a/defaults/defaults b/defaults/defaults
index e71bffc0c..182ab9cac 100644
--- a/defaults/defaults
+++ b/defaults/defaults
@@ -6,23 +6,24 @@ button_layout=O|SHMC
button_offset=0
button_spacing=0
click_to_focus=true
+cycle_draw_frame=true
cycle_hidden=true
cycle_minimum=true
cycle_workspaces=false
dbl_click_time=400
double_click_action=maximize
easy_click=true
+focus_delay=250
focus_hint=true
focus_new=true
-focus_delay=250
frame_opacity=100
full_width_title=true
inactive_opacity=100
keytheme=Default
maximized_offset=0
move_opacity=100
-placement_ratio=20
placement_mode=center
+placement_ratio=20
popup_opacity=100
prevent_focus_stealing=false
raise_delay=250
diff --git a/settings-dialogs/tweaks-settings.c b/settings-dialogs/tweaks-settings.c
index d58588076..2cfcfe876 100644
--- a/settings-dialogs/tweaks-settings.c
+++ b/settings-dialogs/tweaks-settings.c
@@ -58,7 +58,7 @@ void
cb_easy_click_combo_box_changed (GtkComboBox *combo, XfconfChannel *channel)
{
guint n;
-
+
n = 0;
while (modifier_list[n])
{
@@ -140,11 +140,12 @@ wm_tweaks_dialog_configure_widgets (GladeXML *gxml)
gchar *default_placement = NULL;
gboolean modifier_set = FALSE;
guint n;
-
+
/* Cycling tab */
GtkWidget *cycle_workspaces_check = glade_xml_get_widget (gxml, "cycle_workspaces_check");
GtkWidget *cycle_hidden_check = glade_xml_get_widget (gxml, "cycle_hidden_check");
GtkWidget *cycle_minimum_check = glade_xml_get_widget (gxml, "cycle_minimum_check");
+ GtkWidget *cycle_draw_frame = glade_xml_get_widget (gxml, "cycle_draw_frame");
/* Focus tab */
GtkWidget *prevent_focus_stealing_check = glade_xml_get_widget (gxml, "prevent_focus_stealing_check");
@@ -268,110 +269,114 @@ wm_tweaks_dialog_configure_widgets (GladeXML *gxml)
/* Bind easy properties */
/* Cycling tab */
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/cycle_minimum",
G_TYPE_BOOLEAN,
(GObject *)cycle_minimum_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/cycle_hidden",
G_TYPE_BOOLEAN,
(GObject *)cycle_hidden_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/cycle_workspaces",
G_TYPE_BOOLEAN,
(GObject *)cycle_workspaces_check, "active");
+ xfconf_g_property_bind (xfwm4_channel,
+ "/general/cycle_draw_frame",
+ G_TYPE_BOOLEAN,
+ (GObject *)cycle_draw_frame, "active");
/* Focus tab */
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/prevent_focus_stealing",
G_TYPE_BOOLEAN,
(GObject *)prevent_focus_stealing_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/focus_hint",
G_TYPE_BOOLEAN,
(GObject *)focus_hint_check, "active");
-
+
/* Accessibility tab */
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/raise_on_click",
G_TYPE_BOOLEAN,
(GObject *)raise_on_click_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/borderless_maximize",
G_TYPE_BOOLEAN,
(GObject *)borderless_maximize_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/restore_on_move",
G_TYPE_BOOLEAN,
(GObject *)restore_on_move_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/snap_resist",
G_TYPE_BOOLEAN,
(GObject *)snap_resist_check, "active");
/* Workspaces tab */
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/toggle_workspaces",
G_TYPE_BOOLEAN,
(GObject *)toggle_workspaces_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/scroll_workspaces",
G_TYPE_BOOLEAN,
(GObject *)scroll_workspaces_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/wrap_layout",
G_TYPE_BOOLEAN,
(GObject *)wrap_layout_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/wrap_cycle",
G_TYPE_BOOLEAN,
(GObject *)wrap_cycle_check, "active");
/* Placement tab */
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/placement_ratio",
G_TYPE_INT,
(GObject *)placement_ratio_scale, "value");
/* Compositing tab */
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/use_compositing",
G_TYPE_BOOLEAN,
(GObject *)use_compositing_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/unredirect_overlays",
G_TYPE_BOOLEAN,
(GObject *)unredirect_overlays_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/show_frame_shadow",
G_TYPE_BOOLEAN,
(GObject *)show_frame_shadow_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/show_popup_shadow",
G_TYPE_BOOLEAN,
(GObject *)show_popup_shadow_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/show_dock_shadow",
G_TYPE_BOOLEAN,
(GObject *)show_dock_shadow_check, "active");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/frame_opacity",
G_TYPE_INT,
(GObject *)frame_opacity_scale, "value");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/resize_opacity",
G_TYPE_INT,
(GObject *)resize_opacity_scale, "value");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/move_opacity",
G_TYPE_INT,
(GObject *)move_opacity_scale, "value");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/inactive_opacity",
G_TYPE_INT,
(GObject *)inactive_opacity_scale, "value");
- xfconf_g_property_bind (xfwm4_channel,
+ xfconf_g_property_bind (xfwm4_channel,
"/general/popup_opacity",
G_TYPE_INT,
(GObject *)popup_opacity_scale, "value");
@@ -385,12 +390,12 @@ wm_tweaks_dialog_configure_widgets (GladeXML *gxml)
static GOptionEntry entries[] =
{
- { "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &opt_socket_id, N_ ("Session manager socket"), N_ ("SOCKET ID") },
+ { "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &opt_socket_id, N_ ("Session manager socket"), N_ ("SOCKET ID") },
{ "version", 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_version, N_ ("Version information"), NULL },
{ NULL }
};
-int
+int
main (int argc, gchar **argv)
{
GtkWidget *dialog;
diff --git a/settings-dialogs/xfwm4-tweaks-dialog.glade b/settings-dialogs/xfwm4-tweaks-dialog.glade
index cdd2d20a6..a9828783c 100644
--- a/settings-dialogs/xfwm4-tweaks-dialog.glade
+++ b/settings-dialogs/xfwm4-tweaks-dialog.glade
@@ -69,6 +69,21 @@ or "skip taskbar" properties set</property>
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="cycle_draw_frame">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Draw frame around selected windows while cycling</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</widget>
</child>
<child>
diff --git a/src/cycle.c b/src/cycle.c
index c21ce3325..6fe49504b 100644
--- a/src/cycle.c
+++ b/src/cycle.c
@@ -149,7 +149,10 @@ clientCycleEventFilter (XEvent * xevent, gpointer data)
{
if (c)
{
- wireframeUpdate (c, passdata->wireframe);
+ if (passdata->wireframe)
+ {
+ wireframeUpdate (c, passdata->wireframe);
+ }
}
else
{
@@ -233,6 +236,7 @@ clientCycle (Client * c, XKeyEvent * ev)
passdata.cycle_range |= INCLUDE_ALL_WORKSPACES;
}
passdata.c = clientGetNext (c, passdata.cycle_range);
+ passdata.wireframe = NULL;
/* If there is one single client, and if it's eligible for focus, use it */
if ((passdata.c == NULL) && (c != clientGetFocus()) &&
@@ -244,7 +248,10 @@ clientCycle (Client * c, XKeyEvent * ev)
if (passdata.c)
{
TRACE ("entering cycle loop");
- passdata.wireframe = wireframeCreate (passdata.c);
+ if (screen_info->params->cycle_draw_frame)
+ {
+ passdata.wireframe = wireframeCreate (passdata.c);
+ }
passdata.tabwin = tabwinCreate (passdata.c->screen_info->gscr, c,
passdata.c, passdata.cycle_range,
screen_info->params->cycle_workspaces);
@@ -254,7 +261,10 @@ clientCycle (Client * c, XKeyEvent * ev)
TRACE ("leaving cycle loop");
tabwinDestroy (passdata.tabwin);
g_free (passdata.tabwin);
- wireframeDelete (screen_info, passdata.wireframe);
+ if (passdata.wireframe)
+ {
+ wireframeDelete (screen_info, passdata.wireframe);
+ }
updateXserverTime (display_info);
}
diff --git a/src/settings.c b/src/settings.c
index 65746cdc6..58997774a 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -665,6 +665,7 @@ loadSettings (ScreenInfo *screen_info)
{"button_spacing", NULL, G_TYPE_INT, TRUE},
{"click_to_focus", NULL, G_TYPE_BOOLEAN, TRUE},
{"focus_delay", NULL, G_TYPE_INT, TRUE},
+ {"cycle_draw_frame", NULL, G_TYPE_BOOLEAN, TRUE},
{"cycle_hidden", NULL, G_TYPE_BOOLEAN, TRUE},
{"cycle_minimum", NULL, G_TYPE_BOOLEAN, TRUE},
{"cycle_workspaces", NULL, G_TYPE_BOOLEAN, TRUE},
@@ -815,6 +816,8 @@ loadSettings (ScreenInfo *screen_info)
getBoolValue ("click_to_focus", rc);
screen_info->params->cycle_minimum =
getBoolValue ("cycle_minimum", rc);
+ screen_info->params->cycle_draw_frame =
+ getBoolValue ("cycle_draw_frame", rc);
screen_info->params->cycle_hidden =
getBoolValue ("cycle_hidden", rc);
screen_info->params->cycle_workspaces =
@@ -1267,6 +1270,10 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
{
screen_info->params->cycle_minimum = g_value_get_boolean (value);
}
+ else if (!strcmp (name, "cycle_draw_frame"))
+ {
+ screen_info->params->cycle_draw_frame = g_value_get_boolean (value);
+ }
else if (!strcmp (name, "cycle_hidden"))
{
screen_info->params->cycle_hidden = g_value_get_boolean (value);
diff --git a/src/settings.h b/src/settings.h
index c9ac90d25..8e9d17108 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -168,15 +168,15 @@ struct _XfwmParams
int button_spacing;
int double_click_action;
int easy_click;
+ int focus_delay;
int frame_opacity;
int inactive_opacity;
int maximized_offset;
int move_opacity;
- int placement_ratio;
int placement_mode;
+ int placement_ratio;
int popup_opacity;
int raise_delay;
- int focus_delay;
int resize_opacity;
int restore_on_move;
int shadow_delta_height;
@@ -192,6 +192,7 @@ struct _XfwmParams
gboolean box_move;
gboolean box_resize;
gboolean click_to_focus;
+ gboolean cycle_draw_frame;
gboolean cycle_hidden;
gboolean cycle_minimum;
gboolean cycle_workspaces;
@@ -207,9 +208,9 @@ struct _XfwmParams
gboolean show_dock_shadow;
gboolean show_frame_shadow;
gboolean show_popup_shadow;
+ gboolean snap_resist;
gboolean snap_to_border;
gboolean snap_to_windows;
- gboolean snap_resist;
gboolean title_vertical_offset_active;
gboolean title_vertical_offset_inactive;
gboolean toggle_workspaces;