Reverting commit from r677

git-svn-id: http://tint2.googlecode.com/svn/trunk@679 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
o9000 2015-02-01 12:31:15 +00:00 committed by mrovi9000@gmail.com
parent b70e6b500e
commit 856385d5c0
6 changed files with 11 additions and 36 deletions

View file

@ -280,8 +280,6 @@ void add_entry (char *key, char *value)
panel_layer = BOTTOM_LAYER; panel_layer = BOTTOM_LAYER;
else if (strcmp(value, "top") == 0) else if (strcmp(value, "top") == 0)
panel_layer = TOP_LAYER; panel_layer = TOP_LAYER;
else if (strcmp(value, "float") == 0)
panel_layer = FLOAT_LAYER;
else else
panel_layer = NORMAL_LAYER; panel_layer = NORMAL_LAYER;
} }

View file

@ -508,36 +508,18 @@ void set_panel_properties(Panel *p)
} }
// Dock // Dock
long val = server.atom._NET_WM_WINDOW_TYPE_DOCK; long val = panel_dock ? server.atom._NET_WM_WINDOW_TYPE_DOCK : server.atom._NET_WM_WINDOW_TYPE_NORMAL;
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1); XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1);
// Sticky and below other window
val = ALLDESKTOP; val = ALLDESKTOP;
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_DESKTOP, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &val, 1); XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_DESKTOP, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &val, 1);
Atom state[4];
Atom state[5];
int nb_atoms;
state[0] = server.atom._NET_WM_STATE_SKIP_PAGER; state[0] = server.atom._NET_WM_STATE_SKIP_PAGER;
state[1] = server.atom._NET_WM_STATE_SKIP_TASKBAR; state[1] = server.atom._NET_WM_STATE_SKIP_TASKBAR;
state[2] = server.atom._NET_WM_STATE_STICKY; state[2] = server.atom._NET_WM_STATE_STICKY;
switch ( panel_layer ) { state[3] = panel_layer == BOTTOM_LAYER ? server.atom._NET_WM_STATE_BELOW : server.atom._NET_WM_STATE_ABOVE;
case BOTTOM_LAYER: int nb_atoms = panel_layer == NORMAL_LAYER ? 3 : 4;
state[3] = server.atom._NET_WM_STATE_BELOW;
nb_atoms = 4;
break;
case NORMAL_LAYER:
nb_atoms = 3;
break;
case TOP_LAYER:
state[3] = server.atom._NET_WM_STATE_ABOVE;
nb_atoms = 4;
break;
case FLOAT_LAYER:
// Float above or below (allowed by some WM for some layers)
state[3] = server.atom._NET_WM_STATE_BELOW;
state[4] = server.atom._NET_WM_STATE_ABOVE;
nb_atoms = 5;
break;
}
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *) state, nb_atoms); XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *) state, nb_atoms);
// Unfocusable // Unfocusable

View file

@ -39,7 +39,7 @@ extern int mouse_tilt_right;
//panel mode //panel mode
enum { SINGLE_DESKTOP=0, MULTI_DESKTOP }; enum { SINGLE_DESKTOP=0, MULTI_DESKTOP };
enum { BOTTOM_LAYER, NORMAL_LAYER, TOP_LAYER, FLOAT_LAYER }; enum { BOTTOM_LAYER, NORMAL_LAYER, TOP_LAYER };
extern int panel_mode; extern int panel_mode;
extern int wm_menu; extern int wm_menu;
extern int panel_dock; extern int panel_dock;

View file

@ -985,7 +985,6 @@ void create_panel(GtkWidget *parent)
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Top")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Top"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Normal")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Normal"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Bottom")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Bottom"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Float"));
label = gtk_label_new(_("Maximized window")); label = gtk_label_new(_("Maximized window"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);

View file

@ -138,12 +138,10 @@ void config_write_panel(FILE *fp)
fprintf(fp, "\n"); fprintf(fp, "\n");
fprintf(fp, "panel_layer = "); fprintf(fp, "panel_layer = ");
if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 2) { if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 0) {
fprintf(fp, "top"); fprintf(fp, "top");
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 1) { } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 1) {
fprintf(fp, "normal"); fprintf(fp, "center");
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 3) {
fprintf(fp, "float");
} else { } else {
fprintf(fp, "bottom"); fprintf(fp, "bottom");
} }
@ -689,11 +687,9 @@ void add_entry(char *key, char *value)
} }
else if (strcmp(key, "panel_layer") == 0) { else if (strcmp(key, "panel_layer") == 0) {
if (strcmp(value, "bottom") == 0) if (strcmp(value, "bottom") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 0);
else if (strcmp(value, "top") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 2); gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 2);
else if (strcmp(value, "float") == 0) else if (strcmp(value, "top") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 3); gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 0);
else else
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 1); gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 1);
} }

View file

@ -502,7 +502,7 @@ class TintWizardGUI(gtk.Window):
self.registerComponent("panel_dock", self.panelDock) self.registerComponent("panel_dock", self.panelDock)
createLabel(self.tablePanelSettings, text="Panel Layer", gridX=0, gridY=2, xPadding=10) createLabel(self.tablePanelSettings, text="Panel Layer", gridX=0, gridY=2, xPadding=10)
self.panelLayer = createComboBox(self.tablePanelSettings, ["bottom", "top", "normal", "float"], gridX=1, gridY=2, handler=self.changeOccurred) self.panelLayer = createComboBox(self.tablePanelSettings, ["bottom", "top", "normal"], gridX=1, gridY=2, handler=self.changeOccurred)
self.registerComponent("panel_layer", self.panelLayer) self.registerComponent("panel_layer", self.panelLayer)
createLabel(self.tablePanelSettings, text="Strut Policy", gridX=0, gridY=3, xPadding=10) createLabel(self.tablePanelSettings, text="Strut Policy", gridX=0, gridY=3, xPadding=10)