desktop-events.cpp revision 68ac087bc09b818a5e1a7e6bdabc0bc1c3d1dfad
#define __SP_DESKTOP_EVENTS_C__
#ifdef HAVE_CONFIG_H
# include <config.h>
#include "display/guideline.h"
#include "helper/unit-menu.h"
#include "desktop.h"
#include "document.h"
#include "sp-guide.h"
#include "sp-namedview.h"
#include "desktop-handles.h"
#include "event-context.h"
#include "widgets/desktop-widget.h"
#include "sp-metrics.h"
#include "dialogs/dialog-events.h"
#include "message-context.h"
#include "dialogs/guidelinedialog.h"
#include "snap.h"
static bool dragging = false;
case GDK_BUTTON_PRESS:
dragging = true;
case GDK_MOTION_NOTIFY:
if (dragging) {
case GDK_BUTTON_RELEASE:
dragging = false;
return FALSE;
static bool dragging = false;
static bool moved = false;
SPDesktop *desktop = static_cast<SPDesktop*>(gtk_object_get_data(GTK_OBJECT(item->canvas), "SPDesktop"));
case GDK_2BUTTON_PRESS:
dragging = false;
case GDK_BUTTON_PRESS:
dragging = true;
NULL,
case GDK_MOTION_NOTIFY:
if (dragging) {
moved = true;
case GDK_BUTTON_RELEASE:
if (moved) {
moved = false;
dragging = false;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
return ret;