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

Further multiscreenization, floating and drawer correctly multiscreenized

Sat May 12 19:22:39 2001  George Lebl <jirka@5z.com>

	* aligned-widget.c, basep-widget.[ch], sliding-widget.c,
	  multiscree-stuff.[ch], edge-widget.c, border-widget.c,
	  floating-widget.c, menu.c, menu-util.c, panel.c, drawer-widget.c:
	  Further multiscreenization, floating and drawer correctly
	  multiscreenized and dragging of panels between screens working,
	  menus fixed for clamping on offset screens

	* foobar-widget.c: warning fix

	* menu.c: Add tooltips to some items
parent e99552c4
Sat May 12 19:22:39 2001 George Lebl <jirka@5z.com>
* aligned-widget.c, basep-widget.[ch], sliding-widget.c,
multiscree-stuff.[ch], edge-widget.c, border-widget.c,
floating-widget.c, menu.c, menu-util.c, panel.c, drawer-widget.c:
Further multiscreenization, floating and drawer correctly
multiscreenized and dragging of panels between screens working,
menus fixed for clamping on offset screens
* foobar-widget.c: warning fix
* menu.c: Add tooltips to some items
Fri May 11 18:20:39 2001 George Lebl <jirka@5z.com>
* edge-widget.c, sliding-widget.c, multiscreen-stuff.h: multiscreened
......
Sat May 12 19:22:39 2001 George Lebl <jirka@5z.com>
* aligned-widget.c, basep-widget.[ch], sliding-widget.c,
multiscree-stuff.[ch], edge-widget.c, border-widget.c,
floating-widget.c, menu.c, menu-util.c, panel.c, drawer-widget.c:
Further multiscreenization, floating and drawer correctly
multiscreenized and dragging of panels between screens working,
menus fixed for clamping on offset screens
* foobar-widget.c: warning fix
* menu.c: Add tooltips to some items
Fri May 11 18:20:39 2001 George Lebl <jirka@5z.com>
* edge-widget.c, sliding-widget.c, multiscreen-stuff.h: multiscreened
......
......@@ -19,7 +19,8 @@ static void aligned_pos_init (AlignedPos *pos);
static void aligned_pos_set_pos (BasePWidget *basep,
int x, int y,
int w, int h);
int w, int h,
gboolean force);
static void aligned_pos_get_pos (BasePWidget *basep,
int *x, int *y,
int w, int h);
......@@ -94,27 +95,28 @@ aligned_pos_init (AlignedPos *pos) { }
static void
aligned_pos_set_pos (BasePWidget *basep,
int x, int y,
int w, int h)
int w, int h,
gboolean force)
{
int minx, miny, maxx, maxy;
int innerx, innery;
int screen_width, screen_height;
BorderEdge newpos = BORDER_POS(basep->pos)->edge;
AlignedAlignment newalign = ALIGNED_POS(basep->pos)->align;
gdk_window_get_geometry (GTK_WIDGET(basep)->window,
&minx, &miny, &maxx, &maxy, NULL);
gdk_window_get_origin (GTK_WIDGET(basep)->window, &minx, &miny);
maxx += minx;
maxy += miny;
if (x >= minx &&
x <= maxx &&
y >= miny &&
y <= maxy)
return;
/* FIXME: screenchanging stuff */
if ( ! force) {
int minx, miny, maxx, maxy;
gdk_window_get_geometry (GTK_WIDGET(basep)->window,
&minx, &miny, &maxx, &maxy, NULL);
gdk_window_get_origin (GTK_WIDGET(basep)->window, &minx, &miny);
maxx += minx;
maxy += miny;
if (x >= minx &&
x <= maxx &&
y >= miny &&
y <= maxy)
return;
}
innerx = x - multiscreen_x (basep->screen);
innery = y - multiscreen_y (basep->screen);
......
......@@ -309,9 +309,13 @@ basep_widget_state_change (BasePWidget *basep, BasePState state)
}
static void
basep_widget_screen_change (BasePWidget *basep, int screen)
basep_widget_real_screen_change (BasePWidget *basep, int screen)
{
/* FIXME: do multiscreen kind of stuff here */
if (basep->screen != screen) {
basep->screen = screen;
gtk_widget_queue_resize (GTK_WIDGET (basep));
panels_to_sync = TRUE;
}
}
static void
......@@ -357,7 +361,7 @@ basep_widget_class_init (BasePWidgetClass *klass)
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET(BasePWidgetClass,
state_change),
screen_change),
gtk_marshal_NONE__INT,
GTK_TYPE_NONE,
1,
......@@ -369,7 +373,7 @@ basep_widget_class_init (BasePWidgetClass *klass)
klass->mode_change = basep_widget_mode_change;
klass->state_change = basep_widget_state_change;
klass->screen_change = basep_widget_screen_change;
klass->screen_change = basep_widget_real_screen_change;
widget_class->size_request = basep_widget_size_request;
widget_class->size_allocate = basep_widget_size_allocate;
......@@ -1888,13 +1892,17 @@ basep_widget_get_menu_pos (BasePWidget *basep,
x, y, wx, wy,
ww, wh);
if (*x + mreq.width > multiscreen_width (basep->screen))
*x = multiscreen_width (basep->screen) - mreq.width;
if (*x + mreq.width >
multiscreen_x (basep->screen) + multiscreen_width (basep->screen))
*x = multiscreen_x (basep->screen) +
multiscreen_width (basep->screen) - mreq.width;
if (*x < multiscreen_x (basep->screen))
*x = multiscreen_x (basep->screen);
if (*y + mreq.height > multiscreen_height (basep->screen))
*y = multiscreen_height (basep->screen) - mreq.height;
if (*y + mreq.height >
multiscreen_y (basep->screen) + multiscreen_height (basep->screen))
*y = multiscreen_y (basep->screen) +
multiscreen_height (basep->screen) - mreq.height;
if (*y < multiscreen_y (basep->screen))
*y = multiscreen_y (basep->screen);
}
......@@ -2018,13 +2026,23 @@ basep_widget_set_pos (BasePWidget *basep,
int x, int y)
{
int w, h;
int newscreen;
gboolean force = FALSE;
BasePPosClass *klass =
basep_widget_get_pos_class (basep);
g_return_if_fail (klass && klass->set_pos);
/* first take care of switching screens */
newscreen = multiscreen_screen_from_pos (x, y);
if (newscreen >= 0 &&
newscreen != basep->screen) {
force = TRUE;
basep_widget_screen_change (basep, newscreen);
}
basep_widget_get_size (basep, &w, &h);
klass->set_pos(basep, x, y, w, h);
klass->set_pos (basep, x, y, w, h, force);
}
void
......@@ -2052,9 +2070,25 @@ basep_widget_set_state (BasePWidget *basep, BasePState state,
panels_to_sync = TRUE;
}
void
basep_widget_screen_change (BasePWidget *basep, int screen)
{
g_return_if_fail (basep != NULL);
g_return_if_fail (IS_BASEP_WIDGET (basep));
g_return_if_fail (screen >= 0);
if (basep->screen == screen)
return;
gtk_signal_emit (GTK_OBJECT (basep),
basep_widget_signals[SCREEN_CHANGE_SIGNAL],
screen);
}
/*****
* Collision avoidance stuff
*****/
/* FIXME: needs to be per screen! */
typedef struct {
int left;
int center;
......
......@@ -137,7 +137,8 @@ struct _BasePPosClass {
void (*set_pos) (BasePWidget *basep,
int x, int y,
int w, int h);
int w, int h,
gboolean force);
void (*get_pos) (BasePWidget *basep,
int *x, int *y,
......@@ -291,6 +292,8 @@ void basep_widget_pre_convert_hook (BasePWidget *basep);
void basep_widget_set_state (BasePWidget *basep,
BasePState state,
gboolean emit);
void basep_widget_screen_change (BasePWidget *basep,
int screen);
void basep_update_frame (BasePWidget *basep);
......
......@@ -9,6 +9,7 @@
#include "border-widget.h"
#include "panel_config_global.h"
#include "multiscreen-stuff.h"
extern GlobalConfig global_config;
extern int pw_minimized_size;
......
......@@ -141,12 +141,14 @@ drawer_pos_get_applet_orient (BasePWidget *basep)
y = GTK_WIDGET(basep)->allocation.y;
if(porient == PANEL_VERTICAL) {
if(x > (gdk_screen_width()/2))
if (x > (multiscreen_width (basep->screen)/2 +
multiscreen_x (basep->screen)))
return ORIENT_LEFT;
else
return ORIENT_RIGHT;
} else {
if(y > (gdk_screen_height()/2))
if (y > (multiscreen_height (basep->screen)/2 +
multiscreen_y (basep->screen)))
return ORIENT_UP;
else
return ORIENT_DOWN;
......
......@@ -19,7 +19,8 @@ static void edge_pos_init (EdgePos *pos);
static void edge_pos_set_pos (BasePWidget *basep,
int x, int y,
int w, int h);
int w, int h,
gboolean force);
static void edge_pos_get_pos (BasePWidget *basep,
int *x, int *y,
int w, int h);
......@@ -74,30 +75,32 @@ edge_pos_init (EdgePos *pos) { }
static void
edge_pos_set_pos (BasePWidget *basep,
int x, int y,
int w, int h)
int w, int h,
gboolean force)
{
BorderEdge newloc;
int minx, miny, maxx, maxy;
int innerx, innery;
int screen_width, screen_height;
if ( ! force) {
int minx, miny, maxx, maxy;
gdk_window_get_geometry (GTK_WIDGET (basep)->window,
&minx, &miny, &maxx, &maxy, NULL);
gdk_window_get_origin (GTK_WIDGET (basep)->window,
&minx, &miny);
newloc = BORDER_POS(basep->pos)->edge;
gdk_window_get_geometry (GTK_WIDGET (basep)->window,
&minx, &miny, &maxx, &maxy, NULL);
gdk_window_get_origin (GTK_WIDGET (basep)->window,
&minx, &miny);
maxx += minx;
maxy += miny;
newloc = BORDER_POS(basep->pos)->edge;
if (x >= minx &&
x <= maxx &&
y >= miny &&
y <= maxy)
return;
maxx += minx;
maxy += miny;
/* FIXME: screenchanging stuff */
if (x >= minx &&
x <= maxx &&
y >= miny &&
y <= maxy)
return;
}
innerx = x - multiscreen_x (basep->screen);
innery = y - multiscreen_y (basep->screen);
......
......@@ -13,6 +13,7 @@
#include "panel_config_global.h"
#include "foobar-widget.h"
#include "panel-util.h"
#include "multiscreen-stuff.h"
extern GlobalConfig global_config;
extern int pw_minimized_size;
......@@ -35,7 +36,8 @@ static void floating_pos_get_pos(BasePWidget *basep,
static void floating_pos_set_pos (BasePWidget *basep,
int x, int y,
int w, int h);
int w, int h,
gboolean force);
static void floating_pos_get_hide_size (BasePWidget *basep,
PanelOrientType hide_orient,
......@@ -147,12 +149,14 @@ floating_pos_get_applet_orient (BasePWidget *basep)
{
PanelWidget *panel = PANEL_WIDGET (basep->panel);
if (panel->orient == PANEL_HORIZONTAL)
return (FLOATING_POS (basep->pos)->y <
gdk_screen_height () / 2)
return (FLOATING_POS (basep->pos)->y -
multiscreen_y (basep->screen) <
multiscreen_height (basep->screen) / 2)
? ORIENT_DOWN : ORIENT_UP;
else
return (FLOATING_POS (basep->pos)->x <
gdk_screen_width () /2)
return (FLOATING_POS (basep->pos)->x -
multiscreen_x (basep->screen) <
multiscreen_width (basep->screen) /2)
? ORIENT_RIGHT : ORIENT_LEFT;
}
......@@ -171,12 +175,16 @@ floating_pos_get_hide_orient (BasePWidget *basep)
? ORIENT_RIGHT : ORIENT_DOWN;
case BASEP_AUTO_HIDDEN:
if (panel->orient == PANEL_HORIZONTAL) {
return ((pos->x > (gdk_screen_width () - pos->x -
basep->shown_alloc.width))
return ((pos->x >
(multiscreen_width (basep->screen) +
multiscreen_x (basep->screen) - pos->x -
basep->shown_alloc.width))
? ORIENT_RIGHT : ORIENT_LEFT);
} else {
return ((pos->y > (gdk_screen_height () - pos->y -
basep->shown_alloc.height))
return ((pos->y >
(multiscreen_height (basep->screen) +
multiscreen_y (basep->screen) - pos->y -
basep->shown_alloc.height))
? ORIENT_DOWN : ORIENT_UP);
}
default:
......@@ -216,10 +224,26 @@ floating_pos_get_menu_pos (BasePWidget *basep,
}
}
static int
xclamp (int screen, int x, int w)
{
return CLAMP (x, 0,
multiscreen_width (screen) - w);
}
static int
yclamp (int screen, int y, int h)
{
return CLAMP (y, 0,
multiscreen_height (screen) - h -
foobar_widget_get_height (screen));
}
static void
floating_pos_set_pos (BasePWidget *basep,
int x, int y,
int w, int h)
int w, int h,
gboolean force)
{
FloatingPos *pos = FLOATING_POS(basep->pos);
gint16 newx, newy;
......@@ -227,8 +251,8 @@ floating_pos_set_pos (BasePWidget *basep,
x -= basep->offset_x;
y -= basep->offset_y;
newx = pos->x;
newy = pos->y;
x -= multiscreen_x (basep->screen);
y -= multiscreen_y (basep->screen);
if (PANEL_WIDGET (basep->panel)->orient == PANEL_HORIZONTAL) {
switch (basep->state) {
......@@ -245,7 +269,7 @@ floating_pos_set_pos (BasePWidget *basep,
}
}
newx = CLAMP (x, 0, gdk_screen_width () - w);
newx = xclamp (basep->screen, x, w);
if (PANEL_WIDGET (basep->panel)->orient == PANEL_VERTICAL) {
switch (basep->state) {
......@@ -261,7 +285,7 @@ floating_pos_set_pos (BasePWidget *basep,
break;
}
}
newy = CLAMP (y, 0, gdk_screen_height () - h);
newy = yclamp (basep->screen, y, h);
if (newy != pos->y || newx != pos->x) {
pos->x = newx;
......@@ -278,10 +302,10 @@ floating_pos_get_pos(BasePWidget *basep,
int *x, int *y,
int w, int h)
{
*x = CLAMP (FLOATING_POS (basep->pos)->x, 0, gdk_screen_width () - w);
*y = CLAMP (FLOATING_POS (basep->pos)->y,
foobar_widget_get_height (basep->screen),
gdk_screen_height () - h);
*x = xclamp (basep->screen, FLOATING_POS (basep->pos)->x, w);
*y = yclamp (basep->screen, FLOATING_POS (basep->pos)->y, h);
*x += multiscreen_x (basep->screen);
*y += multiscreen_y (basep->screen);
}
static void
......@@ -403,15 +427,14 @@ floating_widget_change_params (FloatingWidget *floating,
gboolean rotate_pixmap_bg,
GdkColor *back_color)
{
FloatingPos *pos = FLOATING_POS (BASEP_WIDGET (floating)->pos);
BasePWidget *basep = BASEP_WIDGET (floating);
FloatingPos *pos = FLOATING_POS (basep->pos);
if (PANEL_WIDGET (BASEP_WIDGET (floating)->panel)->orient != orient)
if (PANEL_WIDGET (basep->panel)->orient != orient)
BASEP_WIDGET (floating)->request_cube = TRUE;
x = CLAMP (x, 0, gdk_screen_width () -
BASEP_WIDGET (floating)->shown_alloc.width);
y = CLAMP (y, 0, gdk_screen_height () -
BASEP_WIDGET (floating)->shown_alloc.height);
x = xclamp (basep->screen, x, basep->shown_alloc.width);
y = yclamp (basep->screen, y, basep->shown_alloc.height);
if (y != pos->y || x != pos->x) {
pos->x = x;
......@@ -421,7 +444,7 @@ floating_widget_change_params (FloatingWidget *floating,
x, y);
}
basep_widget_change_params (BASEP_WIDGET (floating),
basep_widget_change_params (basep,
orient, sz, mode, state,
level, avoid_on_maximize,
hidebuttons_enabled,
......
......@@ -695,7 +695,6 @@ add_task (GwmhTask *task, FoobarWidget *foo)
char *title = NULL;
int slen;
GtkWidget *pixmap = NULL;
char *name;
static GwmhDesk *desk = NULL;
......
......@@ -10,6 +10,7 @@
#include <gnome.h>
#include "panel-include.h"
#include "multiscreen-stuff.h"
/*#define PANEL_DEBUG 1*/
......@@ -17,6 +18,8 @@ extern char *kde_menudir;
extern char *kde_icondir;
extern char *kde_mini_icondir;
extern GlobalConfig global_config;
GtkWidget *
add_menu_separator (GtkWidget *menu)
{
......@@ -30,28 +33,81 @@ add_menu_separator (GtkWidget *menu)
return menuitem;
}
static void
panel_standard_menu_pos (GtkMenu *menu, gint *x, gint *y, gpointer data)
{
gint screen_width;
gint screen_height;
int screen_basex, screen_basey;
int screen;
GtkRequisition requisition;
gtk_widget_get_child_requisition (GTK_WIDGET (menu),
&requisition);
screen = multiscreen_screen_from_pos (*x, *y);
if (screen < 0) {
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
screen_basex = 0;
screen_basey = 0;
} else {
screen_width = multiscreen_width (screen);
screen_height = multiscreen_height (screen);
screen_basex = multiscreen_x (screen);
screen_basey = multiscreen_y (screen);
}
*x -= screen_basex;
*y -= screen_basey;
*x -= 2;
*y -= 2;
if ((*x + requisition.width) > screen_width)
*x -= ((*x + requisition.width) - screen_width);
if (*x < 0)
*x = 0;
if ((*y + requisition.height) > screen_height)
*y -= ((*y + requisition.height) - screen_height);
if (*y < 0)
*y = 0;
*x += screen_basex;
*y += screen_basey;
}
void
panel_menu_position (GtkMenu *menu, gint *x, gint *y, gpointer data)
{
GtkWidget *w = data;
gint wx, wy;
g_return_if_fail(w != NULL);
g_return_if_fail (w != NULL);
if ( ! global_config.off_panel_popups) {
panel_standard_menu_pos (menu, x, y, data);
return;
}
gdk_window_get_origin (w->window, &wx, &wy);
gtk_widget_get_pointer(w, x, y);
if (IS_BASEP_WIDGET (w))
if (IS_BASEP_WIDGET (w)) {
basep_widget_get_menu_pos(BASEP_WIDGET(w),
GTK_WIDGET(menu),
x,y,wx,wy,
w->allocation.width,
w->allocation.height);
else if (IS_FOOBAR_WIDGET (w)) {
} else if (IS_FOOBAR_WIDGET (w)) {
GtkRequisition req;
FoobarWidget *foo = FOOBAR_WIDGET (w);
gtk_widget_get_child_requisition (GTK_WIDGET (menu), &req);
*x = MIN (*x, gdk_screen_width () - req.width);
*y = w->allocation.height;
*x = MIN (*x,
multiscreen_width (foo->screen) +
multiscreen_x (foo->screen) - req.width);
*y = w->allocation.height + multiscreen_y (foo->screen);
}
}
......@@ -85,10 +141,12 @@ applet_menu_position (GtkMenu *menu, gint *x, gint *y, gpointer data)
info->widget->allocation.height);
} else if (IS_FOOBAR_WIDGET (w)) {
GtkRequisition req;
gtk_widget_get_pointer (w, x, y);
FoobarWidget *foo = FOOBAR_WIDGET (w);
gtk_widget_get_child_requisition (GTK_WIDGET (menu), &req);
*x = MIN (*x, gdk_screen_width () - req.width);
*y = w->allocation.height;
*x = MIN (*x,
multiscreen_width (foo->screen) +
multiscreen_x (foo->screen) - req.width);
*y = w->allocation.height + multiscreen_y (foo->screen);
}
}
......
......@@ -30,6 +30,7 @@
#include "title-item.h"
#include "scroll-menu.h"
#include "icon-entry-hack.h"
#include "multiscreen-stuff.h"
/*#define PANEL_DEBUG 1*/
......@@ -2286,10 +2287,26 @@ our_gtk_menu_position (GtkMenu *menu)
{
gint screen_width;
gint screen_height;
int screen_basex, screen_basey;
int screen;
screen = multiscreen_screen_from_pos (x, y);
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
if (screen < 0) {
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
screen_basex = 0;
screen_basey = 0;
} else {
screen_width = multiscreen_width (screen);
screen_height = multiscreen_height (screen);
screen_basex = multiscreen_x (screen);
screen_basey = multiscreen_y (screen);
}
x -= screen_basex;
y -= screen_basey;
x -= 2;
y -= 2;
......@@ -2301,6 +2318,9 @@ our_gtk_menu_position (GtkMenu *menu)
y -= ((y + requisition.height) - screen_height);
if (y < 0)
y = 0;
x += screen_basex;
y += screen_basey;
}
gtk_widget_set_uposition (GTK_MENU_SHELL (menu)->active ?
......@@ -3214,9 +3234,20 @@ create_new_panel (GtkWidget *w, gpointer data)
GdkColor bcolor = {0, 0, 0, 1};
gint16 x, y;
GtkWidget *panel = NULL;
PanelWidget *menu_panel;
int screen;
g_return_if_fail (type != DRAWER_PANEL);
menu_panel = get_panel_from_menu_data (w);
if (menu_panel != NULL)
screen = multiscreen_screen_from_panel
(menu_panel->panel_parent);
else
screen = 0;
/* FIXME: add things on the right screen */
switch (type) {
case ALIGNED_PANEL:
find_empty_pos (&x, &y);
......@@ -5037,6 +5068,9 @@ create_desktop_menu (GtkWidget *menu, gboolean fake_submenus, gboolean tearoff)
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC(panel_lock), 0);
setup_internal_applet_drag(menuitem, "LOCK:NEW");
gtk_tooltips_set_tip (panel_tooltips, menuitem,
_("Lock the screen so that you can "
"temporairly leave your computer"), NULL);
}
g_free (char_tmp);
......@@ -5049,6 +5083,11 @@ create_desktop_menu (GtkWidget *menu, gboolean fake_submenus, gboolean tearoff)
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC(panel_quit), 0);
setup_internal_applet_drag(menuitem, "LOGOUT:NEW");
gtk_tooltips_set_tip (panel_tooltips, menuitem,
_("Log out of this session to log in as "
"a different user or to shut down your "
"computer"),
NULL);
return menu;
}
......@@ -5253,6 +5292,8 @@ create_root_menu (GtkWidget *root_menu,
GTK_SIGNAL_FUNC (run_cb), NULL);
gtk_menu_append (GTK_MENU (root_menu), menuitem);
setup_internal_applet_drag(menuitem, "RUN:NEW");
gtk_tooltips_set_tip (panel_tooltips, menuitem,
_("Execute a command line"), NULL);
if (((has_inline && !has_subs) || has_subs) && has_subs2)
add_menu_separator (root_menu);
......
......@@ -41,7 +41,8 @@ multiscreen_init (void)
return;
/* fake xinerama setup for debugging */
/*screens = 2;
/*
screens = 2;
rectangles = g_new0 (GdkRectangle, 2);
rectangles[1].x = 0;
rectangles[1].y = 0;
......@@ -50,7 +51,8 @@ multiscreen_init (void)
rectangles[0].x = gdk_screen_width () / 2;
rectangles[0].y = gdk_screen_height () / 2;
rectangles[0].width = gdk_screen_width () / 2;
rectangles[0].height = gdk_screen_height () / 2;*/
rectangles[0].height = gdk_screen_height () / 2;
*/
/* no xinerama */
screens = 1;
......@@ -120,3 +122,18 @@ multiscreen_screen_from_pos (int x, int y)
}
return -1;
}
int
multiscreen_screen_from_panel (GtkWidget *widget)
{
g_return_val_if_fail (widget != NULL, 0);
g_return_val_if_fail (IS_BASEP_WIDGET (widget) ||
IS_FOOBAR_WIDGET (widget), 0);
if (IS_BASEP_WIDGET (widget))
return BASEP_WIDGET (widget)->screen;
else if (IS_FOOBAR_WIDGET (widget))
return FOOBAR_WIDGET (widget)->screen;
else
return 0;
}
......@@ -34,5 +34,6 @@ int multiscreen_width (int screen);
int multiscreen_height (int screen);
int multiscreen_screen_from_pos (int x,
int y);
int multiscreen_screen_from_panel (GtkWidget *widget);
#endif /* MULTISCREEN_STUFF_H */
......@@ -795,8 +795,7 @@ panel_event(GtkWidget *widget, GdkEvent *event, PanelData *pd)
}
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
global_config.off_panel_popups
? panel_menu_position : NULL,