mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Code refactoring: replaced macro 'XDND' by 'USE_DOCK_XDND' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when they are used to enable a feature 'xxx'. As the feature concerns the Dock and not DnD in general (WINGs support is not disabled), make it a bit more clear in the macro name and document the configure flag in the Installation Manual. Took opportunity to compile the corresponding file only when the feature is not disabled. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
2ebfcd9c5c
commit
b4cf94aacd
@@ -502,15 +502,16 @@ AS_IF([test "x$enable_modelock" = "xyes"],
|
|||||||
dnl XDND Drag-nd-Drop support
|
dnl XDND Drag-nd-Drop support
|
||||||
dnl =========================
|
dnl =========================
|
||||||
AC_ARG_ENABLE([xdnd],
|
AC_ARG_ENABLE([xdnd],
|
||||||
[AS_HELP_STRING([--disable-xdnd], [disable Drag-nd-Drop support])],
|
[AS_HELP_STRING([--disable-xdnd], [disable support for Drag-and-Drop on the dock @<:@default=enabled@:>@])],
|
||||||
[AS_CASE(["$enableval"],
|
[AS_CASE(["$enableval"],
|
||||||
[yes|no], [],
|
[yes|no], [],
|
||||||
[AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
|
[AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
|
||||||
[enable_xdnd=yes])
|
[enable_xdnd=yes])
|
||||||
AS_IF([test "x$enable_xdnd" = "xyes"],
|
AS_IF([test "x$enable_xdnd" = "xyes"],
|
||||||
[supported_xext="$supported_xext XDnD"
|
[supported_core="$supported_core XDnD"
|
||||||
AC_DEFINE([XDND], [1], [whether Drag-nd-Drop support should be enabled])],
|
AC_DEFINE([USE_DOCK_XDND], [1], [whether Drag-and-Drop on the dock should be enabled])],
|
||||||
[unsupported="$unsupported XDnd"])
|
[unsupported="$unsupported XDnd"])
|
||||||
|
AM_CONDITIONAL([USE_DOCK_XDND], [test "x$enable_dock_xdnd" != "xno"])
|
||||||
|
|
||||||
|
|
||||||
dnl XShape support
|
dnl XShape support
|
||||||
|
|||||||
5
doc/build/Compilation.texi
vendored
5
doc/build/Compilation.texi
vendored
@@ -571,6 +571,11 @@ Disable support for Motif's MWM Window Manager hints.
|
|||||||
These attributes were introduced by the Motif toolkit to ask for special window appearance requests.
|
These attributes were introduced by the Motif toolkit to ask for special window appearance requests.
|
||||||
Nowadays this is covered by the NetWM/EWMH specification, but there are still applications that rely on MWM Hints.
|
Nowadays this is covered by the NetWM/EWMH specification, but there are still applications that rely on MWM Hints.
|
||||||
|
|
||||||
|
@item --disable-xdnd
|
||||||
|
Disable support for dragging and dropping files on the dock, which launches a user-specified command
|
||||||
|
with that file.
|
||||||
|
Starting from version 0.65.6 this feature is enabled by default.
|
||||||
|
|
||||||
@item --enable-ld-version-script
|
@item --enable-ld-version-script
|
||||||
This feature is auto-detected, and you should not use this option.
|
This feature is auto-detected, and you should not use this option.
|
||||||
When compiling a library (@file{wrlib}, ...), @emph{gcc} has the possibility to filter the list of
|
When compiling a library (@file{wrlib}, ...), @emph{gcc} has the possibility to filter the list of
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ wmaker_SOURCES = \
|
|||||||
usermenu.c \
|
usermenu.c \
|
||||||
usermenu.h \
|
usermenu.h \
|
||||||
xdnd.h \
|
xdnd.h \
|
||||||
xdnd.c \
|
|
||||||
xinerama.h \
|
xinerama.h \
|
||||||
xinerama.c \
|
xinerama.c \
|
||||||
xmodifier.h \
|
xmodifier.h \
|
||||||
@@ -108,6 +107,9 @@ wmaker_SOURCES = \
|
|||||||
wsmap.c \
|
wsmap.c \
|
||||||
wsmap.h
|
wsmap.h
|
||||||
|
|
||||||
|
if USE_DOCK_XDND
|
||||||
|
wmaker_SOURCES += xdnd.c
|
||||||
|
endif
|
||||||
if USE_MWM_HINTS
|
if USE_MWM_HINTS
|
||||||
wmaker_SOURCES += motif.h motif.c
|
wmaker_SOURCES += motif.h motif.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
#include "placement.h"
|
#include "placement.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ WAppIcon *wAppIconCreateForDock(WScreen *scr, const char *command, const char *w
|
|||||||
tile = TILE_CLIP;
|
tile = TILE_CLIP;
|
||||||
aicon->icon = icon_create_for_dock(scr, command, wm_instance, wm_class, tile);
|
aicon->icon = icon_create_for_dock(scr, command, wm_instance, wm_class, tile);
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
wXDNDMakeAwareness(aicon->icon->core->window);
|
wXDNDMakeAwareness(aicon->icon->core->window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ static WAppIcon *wAppIconCreate(WWindow *leader_win)
|
|||||||
aicon->wm_instance = wstrdup(leader_win->wm_instance);
|
aicon->wm_instance = wstrdup(leader_win->wm_instance);
|
||||||
|
|
||||||
aicon->icon = icon_create_for_wwindow(leader_win);
|
aicon->icon = icon_create_for_wwindow(leader_win);
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
wXDNDMakeAwareness(aicon->icon->core->window);
|
wXDNDMakeAwareness(aicon->icon->core->window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ void wAppIconDestroy(WAppIcon * aicon)
|
|||||||
wIconDestroy(aicon->icon);
|
wIconDestroy(aicon->icon);
|
||||||
if (aicon->command)
|
if (aicon->command)
|
||||||
wfree(aicon->command);
|
wfree(aicon->command);
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
if (aicon->dnd_command)
|
if (aicon->dnd_command)
|
||||||
wfree(aicon->dnd_command);
|
wfree(aicon->dnd_command);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ typedef struct WAppIcon {
|
|||||||
WIcon *icon;
|
WIcon *icon;
|
||||||
int x_pos, y_pos; /* absolute screen coordinate */
|
int x_pos, y_pos; /* absolute screen coordinate */
|
||||||
char *command; /* command used to launch app */
|
char *command; /* command used to launch app */
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
char *dnd_command; /* command to use when something is */
|
char *dnd_command; /* command to use when something is */
|
||||||
/* dropped on us */
|
/* dropped on us */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1316,7 +1316,7 @@ void wShowInfoPanel(WScreen *scr)
|
|||||||
strbuf = wstrappend(strbuf, ", MWM");
|
strbuf = wstrappend(strbuf, ", MWM");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
strbuf = wstrappend(strbuf, ", XDnD");
|
strbuf = wstrappend(strbuf, ", XDnD");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
30
src/dock.c
30
src/dock.c
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
static WMPropList *dCommand = NULL;
|
static WMPropList *dCommand = NULL;
|
||||||
static WMPropList *dPasteCommand = NULL;
|
static WMPropList *dPasteCommand = NULL;
|
||||||
#ifdef XDND /* XXX was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
static WMPropList *dDropCommand = NULL;
|
static WMPropList *dDropCommand = NULL;
|
||||||
#endif
|
#endif
|
||||||
static WMPropList *dAutoLaunch, *dLock;
|
static WMPropList *dAutoLaunch, *dLock;
|
||||||
@@ -135,7 +135,7 @@ static void make_keys(void)
|
|||||||
|
|
||||||
dCommand = WMRetainPropList(WMCreatePLString("Command"));
|
dCommand = WMRetainPropList(WMCreatePLString("Command"));
|
||||||
dPasteCommand = WMRetainPropList(WMCreatePLString("PasteCommand"));
|
dPasteCommand = WMRetainPropList(WMCreatePLString("PasteCommand"));
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
dDropCommand = WMRetainPropList(WMCreatePLString("DropCommand"));
|
dDropCommand = WMRetainPropList(WMCreatePLString("DropCommand"));
|
||||||
#endif
|
#endif
|
||||||
dLock = WMRetainPropList(WMCreatePLString("Lock"));
|
dLock = WMRetainPropList(WMCreatePLString("Lock"));
|
||||||
@@ -1496,13 +1496,13 @@ static WMPropList *make_icon_state(WAppIcon *btn)
|
|||||||
if (btn->dock != btn->icon->core->screen_ptr->dock && (btn->xindex != 0 || btn->yindex != 0))
|
if (btn->dock != btn->icon->core->screen_ptr->dock && (btn->xindex != 0 || btn->yindex != 0))
|
||||||
WMPutInPLDictionary(node, dOmnipresent, omnipresent);
|
WMPutInPLDictionary(node, dOmnipresent, omnipresent);
|
||||||
|
|
||||||
#ifdef XDND /* was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
if (btn->dnd_command) {
|
if (btn->dnd_command) {
|
||||||
command = WMCreatePLString(btn->dnd_command);
|
command = WMCreatePLString(btn->dnd_command);
|
||||||
WMPutInPLDictionary(node, dDropCommand, command);
|
WMPutInPLDictionary(node, dDropCommand, command);
|
||||||
WMReleasePropList(command);
|
WMReleasePropList(command);
|
||||||
}
|
}
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
|
|
||||||
if (btn->paste_command) {
|
if (btn->paste_command) {
|
||||||
command = WMCreatePLString(btn->paste_command);
|
command = WMCreatePLString(btn->paste_command);
|
||||||
@@ -1682,7 +1682,7 @@ static WAppIcon *restore_icon_state(WScreen *scr, WMPropList *info, int type, in
|
|||||||
aicon->icon->core->descriptor.parent_type = WCLASS_DOCK_ICON;
|
aicon->icon->core->descriptor.parent_type = WCLASS_DOCK_ICON;
|
||||||
aicon->icon->core->descriptor.parent = aicon;
|
aicon->icon->core->descriptor.parent = aicon;
|
||||||
|
|
||||||
#ifdef XDND /* was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
cmd = WMGetFromPLDictionary(info, dDropCommand);
|
cmd = WMGetFromPLDictionary(info, dDropCommand);
|
||||||
if (cmd)
|
if (cmd)
|
||||||
aicon->dnd_command = wstrdup(WMGetFromPLString(cmd));
|
aicon->dnd_command = wstrdup(WMGetFromPLString(cmd));
|
||||||
@@ -1769,7 +1769,7 @@ WAppIcon *wClipRestoreState(WScreen *scr, WMPropList *clip_state)
|
|||||||
wScreenKeepInside(scr, &icon->x_pos, &icon->y_pos, ICON_SIZE, ICON_SIZE);
|
wScreenKeepInside(scr, &icon->x_pos, &icon->y_pos, ICON_SIZE, ICON_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef XDND /* was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
value = WMGetFromPLDictionary(clip_state, dDropCommand);
|
value = WMGetFromPLDictionary(clip_state, dDropCommand);
|
||||||
if (value && WMIsPLString(value))
|
if (value && WMIsPLString(value))
|
||||||
icon->dnd_command = wstrdup(WMGetFromPLString(value));
|
icon->dnd_command = wstrdup(WMGetFromPLString(value));
|
||||||
@@ -2035,7 +2035,7 @@ void wDockDoAutoLaunch(WDock *dock, int workspace)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XDND /* was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
static WDock *findDock(WScreen *scr, XEvent *event, int *icon_pos)
|
static WDock *findDock(WScreen *scr, XEvent *event, int *icon_pos)
|
||||||
{
|
{
|
||||||
WDock *dock;
|
WDock *dock;
|
||||||
@@ -2117,7 +2117,7 @@ int wDockReceiveDNDDrop(WScreen *scr, XEvent *event)
|
|||||||
}
|
}
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
|
|
||||||
Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon)
|
Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon)
|
||||||
{
|
{
|
||||||
@@ -2221,7 +2221,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon
|
|||||||
if (wPreferences.auto_arrange_icons)
|
if (wPreferences.auto_arrange_icons)
|
||||||
wArrangeIcons(dock->screen_ptr, True);
|
wArrangeIcons(dock->screen_ptr, True);
|
||||||
|
|
||||||
#ifdef XDND /* was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
if (icon->command && !icon->dnd_command) {
|
if (icon->command && !icon->dnd_command) {
|
||||||
int len = strlen(icon->command) + 8;
|
int len = strlen(icon->command) + 8;
|
||||||
icon->dnd_command = wmalloc(len);
|
icon->dnd_command = wmalloc(len);
|
||||||
@@ -2401,7 +2401,7 @@ void wDockDetach(WDock *dock, WAppIcon *icon)
|
|||||||
wfree(icon->command);
|
wfree(icon->command);
|
||||||
icon->command = NULL;
|
icon->command = NULL;
|
||||||
}
|
}
|
||||||
#ifdef XDND /* was OFFIX */
|
#ifdef USE_DOCK_XDND
|
||||||
if (icon->dnd_command) {
|
if (icon->dnd_command) {
|
||||||
wfree(icon->dnd_command);
|
wfree(icon->dnd_command);
|
||||||
icon->dnd_command = NULL;
|
icon->dnd_command = NULL;
|
||||||
@@ -3347,7 +3347,7 @@ static void trackDeadProcess(pid_t pid, unsigned char status, WDock *dock)
|
|||||||
char msg[PATH_MAX];
|
char msg[PATH_MAX];
|
||||||
char *cmd;
|
char *cmd;
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
if (icon->drop_launch)
|
if (icon->drop_launch)
|
||||||
cmd = icon->dnd_command;
|
cmd = icon->dnd_command;
|
||||||
else
|
else
|
||||||
@@ -4770,11 +4770,11 @@ static WDock * drawerRestoreState(WScreen *scr, WMPropList *drawer_state)
|
|||||||
drawer = wDockCreate(scr, WM_DRAWER, WMGetFromPLString(value));
|
drawer = wDockCreate(scr, WM_DRAWER, WMGetFromPLString(value));
|
||||||
|
|
||||||
/* restore DnD command and paste command */
|
/* restore DnD command and paste command */
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
value = WMGetFromPLDictionary(drawer_state, dDropCommand);
|
value = WMGetFromPLDictionary(drawer_state, dDropCommand);
|
||||||
if (value && WMIsPLString(value))
|
if (value && WMIsPLString(value))
|
||||||
drawer->icon_array[0]->dnd_command = wstrdup(WMGetFromPLString(value));
|
drawer->icon_array[0]->dnd_command = wstrdup(WMGetFromPLString(value));
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
|
|
||||||
value = WMGetFromPLDictionary(drawer_state, dPasteCommand);
|
value = WMGetFromPLDictionary(drawer_state, dPasteCommand);
|
||||||
if (value && WMIsPLString(value))
|
if (value && WMIsPLString(value))
|
||||||
@@ -4912,14 +4912,14 @@ static WMPropList *drawerSaveState(WDock *drawer)
|
|||||||
WMPutInPLDictionary(drawer_state, dPosition, pstr);
|
WMPutInPLDictionary(drawer_state, dPosition, pstr);
|
||||||
WMReleasePropList(pstr);
|
WMReleasePropList(pstr);
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
/* Store its DnD command */
|
/* Store its DnD command */
|
||||||
if (ai->dnd_command) {
|
if (ai->dnd_command) {
|
||||||
pstr = WMCreatePLString(ai->dnd_command);
|
pstr = WMCreatePLString(ai->dnd_command);
|
||||||
WMPutInPLDictionary(drawer_state, dDropCommand, pstr);
|
WMPutInPLDictionary(drawer_state, dDropCommand, pstr);
|
||||||
WMReleasePropList(pstr);
|
WMReleasePropList(pstr);
|
||||||
}
|
}
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
|
|
||||||
/* Store its paste command */
|
/* Store its paste command */
|
||||||
if (ai->paste_command) {
|
if (ai->paste_command) {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ WAppIcon *wDockFindIconForWindow(WDock *dock, Window window);
|
|||||||
void wDockDoAutoLaunch(WDock *dock, int workspace);
|
void wDockDoAutoLaunch(WDock *dock, int workspace);
|
||||||
void wDockLaunchWithState(WAppIcon *btn, WSavedState *state);
|
void wDockLaunchWithState(WAppIcon *btn, WSavedState *state);
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
|
int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ static void updatePasteCommand(WAppIcon * icon, char *command)
|
|||||||
icon->paste_command = command;
|
icon->paste_command = command;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
static void updateDNDCommand(WAppIcon * icon, char *command)
|
static void updateDNDCommand(WAppIcon * icon, char *command)
|
||||||
{
|
{
|
||||||
if (icon->dnd_command)
|
if (icon->dnd_command)
|
||||||
@@ -77,7 +77,7 @@ static void updateDNDCommand(WAppIcon * icon, char *command)
|
|||||||
}
|
}
|
||||||
icon->dnd_command = command;
|
icon->dnd_command = command;
|
||||||
}
|
}
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
|
|
||||||
static void updateSettingsPanelIcon(AppSettingsPanel * panel)
|
static void updateSettingsPanelIcon(AppSettingsPanel * panel)
|
||||||
{
|
{
|
||||||
@@ -199,7 +199,7 @@ static void panelBtnCallback(WMWidget * self, void *data)
|
|||||||
text = NULL;
|
text = NULL;
|
||||||
}
|
}
|
||||||
updateCommand(panel->editedIcon, text);
|
updateCommand(panel->editedIcon, text);
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
/* cannot free text from this, because it will be not be duplicated
|
/* cannot free text from this, because it will be not be duplicated
|
||||||
* in updateDNDCommand */
|
* in updateDNDCommand */
|
||||||
text = WMGetTextFieldText(panel->dndCommandField);
|
text = WMGetTextFieldText(panel->dndCommandField);
|
||||||
@@ -307,7 +307,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
|
|||||||
panel->dndCommandLabel = WMCreateLabel(panel->dndCommandFrame);
|
panel->dndCommandLabel = WMCreateLabel(panel->dndCommandFrame);
|
||||||
WMResizeWidget(panel->dndCommandLabel, 256, 18);
|
WMResizeWidget(panel->dndCommandLabel, 256, 18);
|
||||||
WMMoveWidget(panel->dndCommandLabel, 10, 45);
|
WMMoveWidget(panel->dndCommandLabel, 10, 45);
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
WMSetTextFieldText(panel->dndCommandField, aicon->dnd_command);
|
WMSetTextFieldText(panel->dndCommandField, aicon->dnd_command);
|
||||||
WMSetLabelText(panel->dndCommandLabel, _("%d will be replaced with the file name"));
|
WMSetLabelText(panel->dndCommandLabel, _("%d will be replaced with the file name"));
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#ifdef USE_XSHAPE
|
#ifdef USE_XSHAPE
|
||||||
# include <X11/extensions/shape.h>
|
# include <X11/extensions/shape.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -539,7 +539,7 @@ static void saveTimestamp(XEvent * event)
|
|||||||
break;
|
break;
|
||||||
case SelectionNotify:
|
case SelectionNotify:
|
||||||
w_global.timestamp.last_event = event->xselection.time;
|
w_global.timestamp.last_event = event->xselection.time;
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
wXDNDProcessSelection(event);
|
wXDNDProcessSelection(event);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@@ -1073,10 +1073,10 @@ static void handleClientMessage(XEvent * event)
|
|||||||
scr->flags.ignore_focus_events = event->xclient.data.l[0] ? 1 : 0;
|
scr->flags.ignore_focus_events = event->xclient.data.l[0] ? 1 : 0;
|
||||||
} else if (wNETWMProcessClientMessage(&event->xclient)) {
|
} else if (wNETWMProcessClientMessage(&event->xclient)) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
} else if (wXDNDProcessClientMessage(&event->xclient)) {
|
} else if (wXDNDProcessClientMessage(&event->xclient)) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Non-standard thing, but needed by OffiX DND.
|
* Non-standard thing, but needed by OffiX DND.
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
case 'd':
|
case 'd':
|
||||||
if (!scr->xdestring) {
|
if (!scr->xdestring) {
|
||||||
scr->flags.dnd_data_convertion_status = 1;
|
scr->flags.dnd_data_convertion_status = 1;
|
||||||
@@ -639,7 +639,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline)
|
|||||||
strcat(out, scr->xdestring);
|
strcat(out, scr->xdestring);
|
||||||
optr += slen;
|
optr += slen;
|
||||||
break;
|
break;
|
||||||
#endif /* XDND */
|
#endif /* USE_DOCK_XDND */
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
if (!selection) {
|
if (!selection) {
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ typedef struct _WScreen {
|
|||||||
/* for window shortcuts */
|
/* for window shortcuts */
|
||||||
WMArray *shortcutWindows[MAX_WINDOW_SHORTCUTS];
|
WMArray *shortcutWindows[MAX_WINDOW_SHORTCUTS];
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
char *xdestring;
|
char *xdestring;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
#include "wmspec.h"
|
#include "wmspec.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "switchmenu.h"
|
#include "switchmenu.h"
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -469,7 +469,7 @@ void StartUp(Bool defaultScreenOnly)
|
|||||||
|
|
||||||
w_global.atom.wm.ignore_focus_events = atom[20];
|
w_global.atom.wm.ignore_focus_events = atom[20];
|
||||||
|
|
||||||
#ifdef XDND
|
#ifdef USE_DOCK_XDND
|
||||||
wXDNDInitializeAtoms();
|
wXDNDInitializeAtoms();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
14
src/xdnd.c
14
src/xdnd.c
@@ -20,19 +20,20 @@
|
|||||||
|
|
||||||
/* Many part of code are ripped of an example from JX's site */
|
/* Many part of code are ripped of an example from JX's site */
|
||||||
|
|
||||||
#include "wconfig.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef XDND
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include "WindowMaker.h"
|
#include "WindowMaker.h"
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <X11/Xatom.h>
|
|
||||||
|
|
||||||
static Atom _XA_XdndAware;
|
static Atom _XA_XdndAware;
|
||||||
static Atom _XA_XdndEnter;
|
static Atom _XA_XdndEnter;
|
||||||
@@ -315,4 +316,3 @@ Bool wXDNDProcessClientMessage(XClientMessageEvent *event)
|
|||||||
}
|
}
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|||||||
Reference in New Issue
Block a user