Commit d7ca8fa0 authored by claes's avatar claes

Popupmenu position corrected

parent 0660a32d
/* /*
* Proview $Id: wb_gre_gtk.cpp,v 1.1 2007-01-04 07:29:02 claes Exp $ * Proview $Id: wb_gre_gtk.cpp,v 1.2 2007-02-05 09:31:23 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "co_cdh.h" #include "co_cdh.h"
#include "co_time.h" #include "co_time.h"
#include "co_dcli.h" #include "co_dcli.h"
#include "co_wow_gtk.h"
#include "wb_ldh.h" #include "wb_ldh.h"
#include "wb_foe_msg.h" #include "wb_foe_msg.h"
#include "wb_vldh_msg.h" #include "wb_vldh_msg.h"
...@@ -142,12 +143,7 @@ void WGreGtk::get_popup_position( int *x, int *y) ...@@ -142,12 +143,7 @@ void WGreGtk::get_popup_position( int *x, int *y)
{ {
gint wind_x, wind_y; gint wind_x, wind_y;
GtkWidget *parent = gtk_widget_get_parent( form_widget); CoWowGtk::PopupPosition( form_widget, *x, *y, &wind_x, &wind_y);
while( !GTK_IS_WINDOW(parent)) *x = wind_x;
parent = gtk_widget_get_parent( parent); *y = wind_y;
if ( parent) {
gtk_window_get_position( GTK_WINDOW(parent), &wind_x, &wind_y);
*x += wind_x;
*y += wind_y + 40;
}
} }
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