* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
result = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_screen (GTK_WINDOW (result), screen);
gtk_window_resize (GTK_WINDOW (result), 1, 1);
- gtk_window_move (GTK_WINDOW (result), -100, -100);
+ gtk_window_move (GTK_WINDOW (result), -99, -99);
gtk_widget_show (result);
}
if ((ev->type == KeyPress || ev->type == KeyRelease) &&
ev->xkey.root == ev->xkey.window)
ev->xkey.window = (Window)data;
+ else if (ev->type == GenericEvent)
+ {
+ XGenericEventCookie *cookie;
+ XIDeviceEvent *dev;
+
+ cookie = &ev->xcookie;
+ dev = (XIDeviceEvent *) cookie->data;
+
+ if (dev->evtype == XI_KeyPress ||
+ dev->evtype == XI_KeyRelease)
+ dev->event = (Window)data;
+ }
return GDK_FILTER_CONTINUE;
}
break;
}
- if ((button == 2 || button == 3) && (actions & GDK_ACTION_ASK))
+ if ((button == GDK_BUTTON_MIDDLE || button == GDK_BUTTON_SECONDARY) && (actions & GDK_ACTION_ASK))
{
*suggested_action = GDK_ACTION_ASK;
*possible_actions = actions;