view gtk/browser.cpp @ 1483:73f2ad84d4ec

Fixed OS/2 windows being shown when setting position/size. Moved the OS/2 specific DW_OS2_NEW_WINDOW flag into os2/dw.c. Deprecated and essentially removed DW_FCF_SHELLPOSITION and DW_FCF_NOBYTEALIGN. These were OS/2 specific and are set automatically now... FCF_SHELLPOSITION was causing the positioning problems that necessitated the window being shown to set the size and position. Right now SHELLPOSITION isn't used at all... causing shell positioning to not work. I hope to have a way to allow shell positioning to work again soon but the idea I had to do this did not work.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 23 Dec 2011 15:58:13 +0000
parents fb59f9eeeecd
children
line wrap: on
line source

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#define MOZILLA_INTERNAL_API

#include <gtk/gtk.h>
#include <gtkmozembed.h>
#include <gtkmozembed_internal.h>
#include "nsIDOMMouseEvent.h"

/**
 * Takes a pointer to a mouse event and returns the mouse
 *  button number or -1 on error.
 */
extern "C" gint mozilla_get_mouse_event_button(gpointer event)
{
   gint  button = 0;
   glong x,y;

   g_return_val_if_fail (event, -1);

   /* the following lines were found in the Galeon source */
   nsIDOMMouseEvent *aMouseEvent = (nsIDOMMouseEvent *) event;
   aMouseEvent->GetButton ((PRUint16 *) &button);
   aMouseEvent->GetClientX ((PRInt32 *) &x);
   aMouseEvent->GetClientY ((PRInt32 *) &y);


   /* for some reason we get different numbers on PPC, this fixes
    * that up... -- MattA */
   if (button == 65536)
   {
      button = 1;
   }
   else if (button == 131072)
   {
      button = 2;
   }

   return button;
}
extern "C" gint mozilla_get_mouse_location( gpointer event, glong *x, glong *y)
{
   g_return_val_if_fail (event, -1);

   /* the following lines were found in the Galeon source */
   nsIDOMMouseEvent *aMouseEvent = (nsIDOMMouseEvent *) event;
   aMouseEvent->GetClientX ((PRInt32 *) x);
   aMouseEvent->GetClientY ((PRInt32 *) y);
   return 0;
}