Commit b7a6375a authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

the autoraise is no longer a non-gnome-wm option only

Wed Feb 09 02:06:20 2000  George Lebl <jirka@5z.com>

	* gnome-panel-properties.c: the autoraise is no longer a non-gnome-wm
	  option only

	* basep-widget.c: do the autoraise even on compliant windowmanagers.
	  Also state_change signal is now called BEFORE the animation occurs.
	  The only purpose of the state_change signal is basically to
	  show and hide drawers, and we want to hide drawers before we start
	  moving.

	* menu.c: fix a segfault when adding drawers

	* drawer-widget.c: when hiding a drawer, raise the parent panel
	  so that the drawer doesn't flash over the panel itself
	  (XMoveResizeWindow first moves a window then resizes and I
	  have no clue how to make both happen at the same time, so this
	  is the only way to make it not be ugly).  Also in get_pos
	  we check temp_hidden and return an offscreen pos if we are
	  temp_hidden.

	* panel.c: when temp_hiding a drawer, move it off screen with gdk
	  so that the hiding is immediate.
parent b0c3efeb
Wed Feb 09 02:06:20 2000 George Lebl <jirka@5z.com>
* gnome-panel-properties.c: the autoraise is no longer a non-gnome-wm
option only
* basep-widget.c: do the autoraise even on compliant windowmanagers.
Also state_change signal is now called BEFORE the animation occurs.
The only purpose of the state_change signal is basically to
show and hide drawers, and we want to hide drawers before we start
moving.
* menu.c: fix a segfault when adding drawers
* drawer-widget.c: when hiding a drawer, raise the parent panel
so that the drawer doesn't flash over the panel itself
(XMoveResizeWindow first moves a window then resizes and I
have no clue how to make both happen at the same time, so this
is the only way to make it not be ugly). Also in get_pos
we check temp_hidden and return an offscreen pos if we are
temp_hidden.
* panel.c: when temp_hiding a drawer, move it off screen with gdk
so that the hiding is immediate.
Mon Feb 07 18:43:42 2000 George Lebl <jirka@5z.com> Mon Feb 07 18:43:42 2000 George Lebl <jirka@5z.com>
* session.c,extern.c: make the session saving check for non existent * session.c,extern.c: make the session saving check for non existent
......
Wed Feb 09 02:06:20 2000 George Lebl <jirka@5z.com>
* gnome-panel-properties.c: the autoraise is no longer a non-gnome-wm
option only
* basep-widget.c: do the autoraise even on compliant windowmanagers.
Also state_change signal is now called BEFORE the animation occurs.
The only purpose of the state_change signal is basically to
show and hide drawers, and we want to hide drawers before we start
moving.
* menu.c: fix a segfault when adding drawers
* drawer-widget.c: when hiding a drawer, raise the parent panel
so that the drawer doesn't flash over the panel itself
(XMoveResizeWindow first moves a window then resizes and I
have no clue how to make both happen at the same time, so this
is the only way to make it not be ugly). Also in get_pos
we check temp_hidden and return an offscreen pos if we are
temp_hidden.
* panel.c: when temp_hiding a drawer, move it off screen with gdk
so that the hiding is immediate.
Mon Feb 07 18:43:42 2000 George Lebl <jirka@5z.com> Mon Feb 07 18:43:42 2000 George Lebl <jirka@5z.com>
* session.c,extern.c: make the session saving check for non existent * session.c,extern.c: make the session saving check for non existent
......
...@@ -435,8 +435,7 @@ basep_enter_notify(BasePWidget *basep, ...@@ -435,8 +435,7 @@ basep_enter_notify(BasePWidget *basep,
basep_widget_autoshow (basep); basep_widget_autoshow (basep);
} }
if (!xstuff_is_compliant_wm() && if (global_config.autoraise)
global_config.autoraise)
gdk_window_raise(GTK_WIDGET(basep)->window); gdk_window_raise(GTK_WIDGET(basep)->window);
return FALSE; return FALSE;
...@@ -598,7 +597,7 @@ basep_widget_do_hiding(BasePWidget *basep, PanelOrientType hide_orient, ...@@ -598,7 +597,7 @@ basep_widget_do_hiding(BasePWidget *basep, PanelOrientType hide_orient,
(diff/1000.0)*200*(10001-(step*step)); (diff/1000.0)*200*(10001-(step*step));
basep_widget_set_ebox_orient(basep, hide_orient); basep_widget_set_ebox_orient(basep, hide_orient);
while(x != dx || while(x != dx ||
y != dy || y != dy ||
w != dw || w != dw ||
...@@ -1368,6 +1367,13 @@ basep_widget_explicit_hide (BasePWidget *basep, BasePState state) ...@@ -1368,6 +1367,13 @@ basep_widget_explicit_hide (BasePWidget *basep, BasePState state)
} }
gnome_triggers_vdo("", NULL, supinfo); gnome_triggers_vdo("", NULL, supinfo);
gtk_signal_emit(GTK_OBJECT(basep),
basep_widget_signals[STATE_CHANGE_SIGNAL],
state);
/* if the app did any updating of the interface, flush that for us*/
gdk_flush();
if (GTK_WIDGET_REALIZED(GTK_WIDGET(basep))) { if (GTK_WIDGET_REALIZED(GTK_WIDGET(basep))) {
BasePPosClass *klass = basep_widget_get_pos_class (basep); BasePPosClass *klass = basep_widget_get_pos_class (basep);
...@@ -1393,11 +1399,6 @@ basep_widget_explicit_hide (BasePWidget *basep, BasePState state) ...@@ -1393,11 +1399,6 @@ basep_widget_explicit_hide (BasePWidget *basep, BasePState state)
basep->state = state; basep->state = state;
basep_widget_update_winhints (basep); basep_widget_update_winhints (basep);
gtk_signal_emit(GTK_OBJECT(basep),
basep_widget_signals[STATE_CHANGE_SIGNAL],
basep->state);
} }
void void
...@@ -1533,6 +1534,13 @@ basep_widget_autohide (gpointer data) ...@@ -1533,6 +1534,13 @@ basep_widget_autohide (gpointer data)
gnome_triggers_vdo("", NULL, supinfo); gnome_triggers_vdo("", NULL, supinfo);
gtk_signal_emit(GTK_OBJECT(basep),
basep_widget_signals[STATE_CHANGE_SIGNAL],
BASEP_AUTO_HIDDEN);
/* if the app did any updating of the interface, flush that for us*/
gdk_flush();
if (GTK_WIDGET_REALIZED(basep)) { if (GTK_WIDGET_REALIZED(basep)) {
BasePPosClass *klass = basep_widget_get_pos_class (basep); BasePPosClass *klass = basep_widget_get_pos_class (basep);
PanelOrientType hide_orient; PanelOrientType hide_orient;
...@@ -1561,10 +1569,6 @@ basep_widget_autohide (gpointer data) ...@@ -1561,10 +1569,6 @@ basep_widget_autohide (gpointer data)
basep->state = BASEP_AUTO_HIDDEN; basep->state = BASEP_AUTO_HIDDEN;
basep_widget_update_winhints (basep); basep_widget_update_winhints (basep);
gtk_signal_emit(GTK_OBJECT(basep),
basep_widget_signals[STATE_CHANGE_SIGNAL],
BASEP_AUTO_HIDDEN);
basep->leave_notify_timer_tag = 0; basep->leave_notify_timer_tag = 0;
return FALSE; return FALSE;
} }
......
...@@ -206,6 +206,10 @@ void ...@@ -206,6 +206,10 @@ void
drawer_widget_close_drawer (DrawerWidget *drawer, BasePWidget *parentp) drawer_widget_close_drawer (DrawerWidget *drawer, BasePWidget *parentp)
{ {
BasePWidget *basep = BASEP_WIDGET (drawer); BasePWidget *basep = BASEP_WIDGET (drawer);
if(GTK_WIDGET(parentp)->window)
gdk_window_raise(GTK_WIDGET(parentp)->window);
switch (DRAWER_POS (basep->pos)->orient) { switch (DRAWER_POS (basep->pos)->orient) {
case ORIENT_UP: case ORIENT_UP:
case ORIENT_LEFT: case ORIENT_LEFT:
...@@ -260,6 +264,14 @@ drawer_pos_get_pos(BasePWidget *basep, ...@@ -260,6 +264,14 @@ drawer_pos_get_pos(BasePWidget *basep,
{ {
PanelWidget *panel = PANEL_WIDGET(basep->panel); PanelWidget *panel = PANEL_WIDGET(basep->panel);
DrawerPos *pos = DRAWER_POS (basep->pos); DrawerPos *pos = DRAWER_POS (basep->pos);
/* we are shown but we are hidden, life is full of ironies */
if (pos->temp_hidden) {
*x = -width - 1;
*y = -height - 1;
return;
}
if (panel->master_widget && if (panel->master_widget &&
GTK_WIDGET_REALIZED (panel->master_widget) && GTK_WIDGET_REALIZED (panel->master_widget) &&
/*"allocated" data will be set on each allocation, until then, /*"allocated" data will be set on each allocation, until then,
......
...@@ -887,7 +887,7 @@ misc_notebook_page(void) ...@@ -887,7 +887,7 @@ misc_notebook_page(void)
gtk_box_pack_start (GTK_BOX (box), drawer_auto_close_cb, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), drawer_auto_close_cb, FALSE, FALSE, 0);
/* Autoraise */ /* Autoraise */
autoraise_cb = gtk_check_button_new_with_label (_("Raise panels on mouse-over (non GNOME compliant window managers only)")); autoraise_cb = gtk_check_button_new_with_label (_("Raise panels on mouse-over"));
gtk_signal_connect (GTK_OBJECT (autoraise_cb), "toggled", gtk_signal_connect (GTK_OBJECT (autoraise_cb), "toggled",
GTK_SIGNAL_FUNC (changed_cb), NULL); GTK_SIGNAL_FUNC (changed_cb), NULL);
gtk_box_pack_start (GTK_BOX (box), autoraise_cb, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), autoraise_cb, FALSE, FALSE, 0);
......
...@@ -887,7 +887,7 @@ misc_notebook_page(void) ...@@ -887,7 +887,7 @@ misc_notebook_page(void)
gtk_box_pack_start (GTK_BOX (box), drawer_auto_close_cb, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), drawer_auto_close_cb, FALSE, FALSE, 0);
/* Autoraise */ /* Autoraise */
autoraise_cb = gtk_check_button_new_with_label (_("Raise panels on mouse-over (non GNOME compliant window managers only)")); autoraise_cb = gtk_check_button_new_with_label (_("Raise panels on mouse-over"));
gtk_signal_connect (GTK_OBJECT (autoraise_cb), "toggled", gtk_signal_connect (GTK_OBJECT (autoraise_cb), "toggled",
GTK_SIGNAL_FUNC (changed_cb), NULL); GTK_SIGNAL_FUNC (changed_cb), NULL);
gtk_box_pack_start (GTK_BOX (box), autoraise_cb, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), autoraise_cb, FALSE, FALSE, 0);
......
...@@ -442,10 +442,10 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel) ...@@ -442,10 +442,10 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel)
GnomeDesktopEntry *dentry; GnomeDesktopEntry *dentry;
g_free (filename); g_free (filename);
g_free(li->data);
filename = g_concat_dir_and_file(dirname, li->data); filename = g_concat_dir_and_file(dirname, li->data);
g_free (li->data);
if (stat (filename, &s) != 0) if (stat (filename, &s) != 0)
continue; continue;
if (S_ISDIR (s.st_mode)) { if (S_ISDIR (s.st_mode)) {
......
...@@ -431,13 +431,22 @@ state_hide_foreach(GtkWidget *w, gpointer data) ...@@ -431,13 +431,22 @@ state_hide_foreach(GtkWidget *w, gpointer data)
if(info->type == APPLET_DRAWER) { if(info->type == APPLET_DRAWER) {
Drawer *drawer = info->data; Drawer *drawer = info->data;
BasePWidget *basep = BASEP_WIDGET(drawer->drawer); BasePWidget *basep = BASEP_WIDGET(drawer->drawer);
GtkWidget *widget = GTK_WIDGET(basep);
DRAWER_POS (basep->pos)->temp_hidden = TRUE; DRAWER_POS (basep->pos)->temp_hidden = TRUE;
gtk_container_foreach(GTK_CONTAINER(basep->panel), gtk_container_foreach(GTK_CONTAINER(basep->panel),
state_hide_foreach, state_hide_foreach,
NULL); NULL);
gtk_widget_queue_resize (GTK_WIDGET (basep)); gtk_widget_queue_resize (widget);
/* quickly hide the window from sight, the allocation
and all that will get updated in the main loop */
if(widget->window) {
gdk_window_move(widget->window,
-widget->allocation.width - 1,
-widget->allocation.height - 1);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment