mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Remove #ifdef NETWM_HINTS constructs
NETWM_HINT is always defined in src/wconfig.h.in, so let's remove it from there too.
This commit is contained in:
@@ -976,11 +976,7 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
GrabModeAsync, None, None, CurrentTime);
|
GrabModeAsync, None, None, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wPreferences.disable_miniwindows
|
if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon) {
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
if (!wwin->flags.icon_moved) {
|
if (!wwin->flags.icon_moved) {
|
||||||
PlaceIcon(wwin->screen_ptr, &wwin->icon_x, &wwin->icon_y, wGetHeadForWindow(wwin));
|
PlaceIcon(wwin->screen_ptr, &wwin->icon_x, &wwin->icon_y, wGetHeadForWindow(wwin));
|
||||||
}
|
}
|
||||||
@@ -1003,11 +999,7 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
* something before the animation starts (and the server is grabbed) */
|
* something before the animation starts (and the server is grabbed) */
|
||||||
XSync(dpy, 0);
|
XSync(dpy, 0);
|
||||||
|
|
||||||
if (wPreferences.disable_miniwindows
|
if (wPreferences.disable_miniwindows || wwin->flags.net_handle_icon)
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
|| wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
wClientSetState(wwin, IconicState, None);
|
wClientSetState(wwin, IconicState, None);
|
||||||
else
|
else
|
||||||
wClientSetState(wwin, IconicState, wwin->icon->icon_win);
|
wClientSetState(wwin, IconicState, wwin->icon->icon_win);
|
||||||
@@ -1018,25 +1010,18 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
&& !wPreferences.no_animations) {
|
&& !wPreferences.no_animations) {
|
||||||
int ix, iy, iw, ih;
|
int ix, iy, iw, ih;
|
||||||
|
|
||||||
if (!wPreferences.disable_miniwindows
|
if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon) {
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
ix = wwin->icon_x;
|
ix = wwin->icon_x;
|
||||||
iy = wwin->icon_y;
|
iy = wwin->icon_y;
|
||||||
iw = wwin->icon->core->width;
|
iw = wwin->icon->core->width;
|
||||||
ih = wwin->icon->core->height;
|
ih = wwin->icon->core->height;
|
||||||
} else {
|
} else {
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
if (wwin->flags.net_handle_icon) {
|
if (wwin->flags.net_handle_icon) {
|
||||||
ix = wwin->icon_x;
|
ix = wwin->icon_x;
|
||||||
iy = wwin->icon_y;
|
iy = wwin->icon_y;
|
||||||
iw = wwin->icon_w;
|
iw = wwin->icon_w;
|
||||||
ih = wwin->icon_h;
|
ih = wwin->icon_h;
|
||||||
} else
|
} else {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
ix = 0;
|
ix = 0;
|
||||||
iy = 0;
|
iy = 0;
|
||||||
iw = wwin->screen_ptr->scr_width;
|
iw = wwin->screen_ptr->scr_width;
|
||||||
@@ -1051,12 +1036,7 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
|
|
||||||
wwin->flags.skip_next_animation = 0;
|
wwin->flags.skip_next_animation = 0;
|
||||||
|
|
||||||
if (!wPreferences.disable_miniwindows
|
if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon) {
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
|
|
||||||
if (wwin->screen_ptr->current_workspace == wwin->frame->workspace ||
|
if (wwin->screen_ptr->current_workspace == wwin->frame->workspace ||
|
||||||
IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons)
|
IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons)
|
||||||
|
|
||||||
@@ -1110,10 +1090,7 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
* it seems to me we might break behaviour this way.
|
* it seems to me we might break behaviour this way.
|
||||||
*/
|
*/
|
||||||
if (wwin->flags.selected && !wPreferences.disable_miniwindows
|
if (wwin->flags.selected && !wPreferences.disable_miniwindows
|
||||||
#ifdef NETWM_HINTS
|
&& !wwin->flags.net_handle_icon)
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
wIconSelect(wwin->icon);
|
wIconSelect(wwin->icon);
|
||||||
|
|
||||||
WMPostNotificationName(WMNChangedState, wwin, "iconify");
|
WMPostNotificationName(WMNChangedState, wwin, "iconify");
|
||||||
@@ -1124,13 +1101,9 @@ void wIconifyWindow(WWindow * wwin)
|
|||||||
|
|
||||||
void wDeiconifyWindow(WWindow * wwin)
|
void wDeiconifyWindow(WWindow * wwin)
|
||||||
{
|
{
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
/* we're hiding for show_desktop */
|
/* we're hiding for show_desktop */
|
||||||
int netwm_hidden = wwin->flags.net_show_desktop &&
|
int netwm_hidden = wwin->flags.net_show_desktop &&
|
||||||
wwin->frame->workspace != wwin->screen_ptr->current_workspace;
|
wwin->frame->workspace != wwin->screen_ptr->current_workspace;
|
||||||
#else
|
|
||||||
int netwm_hidden = False;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!netwm_hidden)
|
if (!netwm_hidden)
|
||||||
wWindowChangeWorkspace(wwin, wwin->screen_ptr->current_workspace);
|
wWindowChangeWorkspace(wwin, wwin->screen_ptr->current_workspace);
|
||||||
@@ -1159,10 +1132,7 @@ void wDeiconifyWindow(WWindow * wwin)
|
|||||||
/* maybe we want to do this regardless of net_handle_icon
|
/* maybe we want to do this regardless of net_handle_icon
|
||||||
* it seems to me we might break behaviour this way.
|
* it seems to me we might break behaviour this way.
|
||||||
*/
|
*/
|
||||||
if (!wPreferences.disable_miniwindows
|
if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
&& wwin->icon != NULL) {
|
&& wwin->icon != NULL) {
|
||||||
if (wwin->icon->selected)
|
if (wwin->icon->selected)
|
||||||
wIconSelect(wwin->icon);
|
wIconSelect(wwin->icon);
|
||||||
@@ -1179,24 +1149,18 @@ void wDeiconifyWindow(WWindow * wwin)
|
|||||||
int ix, iy, iw, ih;
|
int ix, iy, iw, ih;
|
||||||
|
|
||||||
if (!wPreferences.disable_miniwindows
|
if (!wPreferences.disable_miniwindows
|
||||||
#ifdef NETWM_HINTS
|
&& !wwin->flags.net_handle_icon) {
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
ix = wwin->icon_x;
|
ix = wwin->icon_x;
|
||||||
iy = wwin->icon_y;
|
iy = wwin->icon_y;
|
||||||
iw = wwin->icon->core->width;
|
iw = wwin->icon->core->width;
|
||||||
ih = wwin->icon->core->height;
|
ih = wwin->icon->core->height;
|
||||||
} else {
|
} else {
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
if (wwin->flags.net_handle_icon) {
|
if (wwin->flags.net_handle_icon) {
|
||||||
ix = wwin->icon_x;
|
ix = wwin->icon_x;
|
||||||
iy = wwin->icon_y;
|
iy = wwin->icon_y;
|
||||||
iw = wwin->icon_w;
|
iw = wwin->icon_w;
|
||||||
ih = wwin->icon_h;
|
ih = wwin->icon_h;
|
||||||
} else
|
} else {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
ix = 0;
|
ix = 0;
|
||||||
iy = 0;
|
iy = 0;
|
||||||
iw = wwin->screen_ptr->scr_width;
|
iw = wwin->screen_ptr->scr_width;
|
||||||
@@ -1207,7 +1171,7 @@ void wDeiconifyWindow(WWindow * wwin)
|
|||||||
wwin->frame_x, wwin->frame_y,
|
wwin->frame_x, wwin->frame_y,
|
||||||
wwin->frame->core->width, wwin->frame->core->height);
|
wwin->frame->core->width, wwin->frame->core->height);
|
||||||
}
|
}
|
||||||
#endif /* ANIMATIONS */
|
#endif /* ANIMATIONS */
|
||||||
wwin->flags.skip_next_animation = 0;
|
wwin->flags.skip_next_animation = 0;
|
||||||
XGrabServer(dpy);
|
XGrabServer(dpy);
|
||||||
if (!wwin->flags.shaded) {
|
if (!wwin->flags.shaded) {
|
||||||
@@ -1222,10 +1186,7 @@ void wDeiconifyWindow(WWindow * wwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!wPreferences.disable_miniwindows && wwin->icon != NULL
|
if (!wPreferences.disable_miniwindows && wwin->icon != NULL
|
||||||
#ifdef NETWM_HINTS
|
&& !wwin->flags.net_handle_icon) {
|
||||||
&& !wwin->flags.net_handle_icon
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
RemoveFromStackList(wwin->icon->core);
|
RemoveFromStackList(wwin->icon->core);
|
||||||
/* removeIconGrabs(wwin->icon); */
|
/* removeIconGrabs(wwin->icon); */
|
||||||
wIconDestroy(wwin->icon);
|
wIconDestroy(wwin->icon);
|
||||||
|
|||||||
@@ -275,9 +275,7 @@ WApplication *wApplicationCreate(WWindow * wwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wapp->main_window_desc->fake_group = wwin->fake_group;
|
wapp->main_window_desc->fake_group = wwin->fake_group;
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wapp->main_window_desc->net_icon_image = RRetainImage(wwin->net_icon_image);
|
wapp->main_window_desc->net_icon_image = RRetainImage(wwin->net_icon_image);
|
||||||
#endif
|
|
||||||
|
|
||||||
extractIcon(wapp->main_window_desc);
|
extractIcon(wapp->main_window_desc);
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,7 @@
|
|||||||
#include "stacking.h"
|
#include "stacking.h"
|
||||||
#include "appicon.h"
|
#include "appicon.h"
|
||||||
#include "appmenu.h"
|
#include "appmenu.h"
|
||||||
#ifdef NETWM_HINTS
|
#include "wmspec.h"
|
||||||
# include "wmspec.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****** Global Variables ******/
|
/****** Global Variables ******/
|
||||||
|
|
||||||
@@ -643,9 +641,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
|
|||||||
|
|
||||||
XFree(attr);
|
XFree(attr);
|
||||||
} else {
|
} else {
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMCheckClientHintChange(wwin, event);
|
wNETWMCheckClientHintChange(wwin, event);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1604,9 +1604,7 @@ void wShowInfoPanel(WScreen * scr)
|
|||||||
char buf[80];
|
char buf[80];
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
list[j++] = "WMSPEC";
|
list[j++] = "WMSPEC";
|
||||||
#endif
|
|
||||||
#ifdef MWM_HINTS
|
#ifdef MWM_HINTS
|
||||||
list[j++] = "MWM";
|
list[j++] = "MWM";
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -56,10 +56,7 @@
|
|||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "balloon.h"
|
#include "balloon.h"
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
#include "wmspec.h"
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
# include "wmspec.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/******** Global Variables **********/
|
/******** Global Variables **********/
|
||||||
extern XContext wWinContext;
|
extern XContext wWinContext;
|
||||||
@@ -1012,10 +1009,8 @@ static void handleClientMessage(XEvent * event)
|
|||||||
if (!scr)
|
if (!scr)
|
||||||
return;
|
return;
|
||||||
scr->flags.ignore_focus_events = event->xclient.data.l[0] ? 1 : 0;
|
scr->flags.ignore_focus_events = event->xclient.data.l[0] ? 1 : 0;
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
} else if (wNETWMProcessClientMessage(&event->xclient)) {
|
} else if (wNETWMProcessClientMessage(&event->xclient)) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
#endif
|
|
||||||
#ifdef XDND
|
#ifdef XDND
|
||||||
} else if (wXDNDProcessClientMessage(&event->xclient)) {
|
} else if (wXDNDProcessClientMessage(&event->xclient)) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
|
|||||||
@@ -155,11 +155,9 @@ WIcon *wIconCreate(WWindow * wwin)
|
|||||||
#else
|
#else
|
||||||
icon->show_title = 1;
|
icon->show_title = 1;
|
||||||
#endif
|
#endif
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
if (!icon->image && !WFLAGP(wwin, always_user_icon))
|
if (!icon->image && !WFLAGP(wwin, always_user_icon))
|
||||||
icon->image = RRetainImage(wwin->net_icon_image);
|
icon->image = RRetainImage(wwin->net_icon_image);
|
||||||
if (!icon->image)
|
if (!icon->image)
|
||||||
#endif
|
|
||||||
icon->image = wDefaultGetImage(scr, wwin->wm_instance, wwin->wm_class);
|
icon->image = wDefaultGetImage(scr, wwin->wm_instance, wwin->wm_class);
|
||||||
|
|
||||||
file = wDefaultGetIconFile(scr, wwin->wm_instance, wwin->wm_class, False);
|
file = wDefaultGetIconFile(scr, wwin->wm_instance, wwin->wm_class, False);
|
||||||
@@ -583,11 +581,7 @@ void wIconUpdate(WIcon * icon)
|
|||||||
XFreePixmap(dpy, icon->pixmap);
|
XFreePixmap(dpy, icon->pixmap);
|
||||||
icon->pixmap = None;
|
icon->pixmap = None;
|
||||||
|
|
||||||
if (wwin && (WFLAGP(wwin, always_user_icon)
|
if (wwin && (WFLAGP(wwin, always_user_icon) || wwin->net_icon_image))
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
|| wwin->net_icon_image
|
|
||||||
#endif
|
|
||||||
))
|
|
||||||
goto user_icon;
|
goto user_icon;
|
||||||
|
|
||||||
/* use client specified icon window */
|
/* use client specified icon window */
|
||||||
|
|||||||
@@ -1532,7 +1532,7 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
|
|||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(NETWM_HINTS) && defined(VIRTUAL_DESKTOP)
|
#if defined(VIRTUAL_DESKTOP)
|
||||||
wWorkspaceResizeViewport(scr, scr->current_workspace);
|
wWorkspaceResizeViewport(scr, scr->current_workspace);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1803,7 +1803,7 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev)
|
|||||||
head != wGetHeadForWindow(wwin)) {
|
head != wGetHeadForWindow(wwin)) {
|
||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
}
|
}
|
||||||
#if defined(NETWM_HINTS) && defined(VIRTUAL_DESKTOP)
|
#if defined(VIRTUAL_DESKTOP)
|
||||||
if (started)
|
if (started)
|
||||||
wWorkspaceResizeViewport(scr, scr->current_workspace);
|
wWorkspaceResizeViewport(scr, scr->current_workspace);
|
||||||
#endif
|
#endif
|
||||||
@@ -2096,7 +2096,7 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
|
|||||||
if (wPreferences.auto_arrange_icons && wXineramaHeads(scr) > 1 && head != wGetHeadForWindow(wwin)) {
|
if (wPreferences.auto_arrange_icons && wXineramaHeads(scr) > 1 && head != wGetHeadForWindow(wwin)) {
|
||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
}
|
}
|
||||||
#if defined(NETWM_HINTS) && defined(VIRTUAL_DESKTOP)
|
#if defined(VIRTUAL_DESKTOP)
|
||||||
wWorkspaceResizeViewport(scr, scr->current_workspace);
|
wWorkspaceResizeViewport(scr, scr->current_workspace);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/screen.c
14
src/screen.c
@@ -53,9 +53,7 @@
|
|||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "balloon.h"
|
#include "balloon.h"
|
||||||
#include "geomview.h"
|
#include "geomview.h"
|
||||||
#ifdef NETWM_HINTS
|
#include "wmspec.h"
|
||||||
# include "wmspec.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
|
||||||
@@ -704,9 +702,7 @@ WScreen *wScreenInit(int screen_number)
|
|||||||
|
|
||||||
createInternalWindows(scr);
|
createInternalWindows(scr);
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMInitStuff(scr);
|
wNETWMInitStuff(scr);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* create initial workspace */
|
/* create initial workspace */
|
||||||
wWorkspaceNew(scr);
|
wWorkspaceNew(scr);
|
||||||
@@ -789,7 +785,7 @@ void wScreenUpdateUsableArea(WScreen * scr)
|
|||||||
scr->totalUsableArea[i].x1 += offset;
|
scr->totalUsableArea[i].x1 += offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
{
|
{
|
||||||
WArea area;
|
WArea area;
|
||||||
if (wNETWMGetUsableArea(scr, i, &area)) {
|
if (wNETWMGetUsableArea(scr, i, &area)) {
|
||||||
@@ -799,7 +795,6 @@ void wScreenUpdateUsableArea(WScreen * scr)
|
|||||||
scr->totalUsableArea[i].y2 = WMIN(scr->totalUsableArea[i].y2, area.y2);
|
scr->totalUsableArea[i].y2 = WMIN(scr->totalUsableArea[i].y2, area.y2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
scr->usableArea[i] = scr->totalUsableArea[i];
|
scr->usableArea[i] = scr->totalUsableArea[i];
|
||||||
|
|
||||||
@@ -859,13 +854,10 @@ void wScreenUpdateUsableArea(WScreen * scr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMUpdateWorkarea(scr, area);
|
wNETWMUpdateWorkarea(scr, area);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (wPreferences.auto_arrange_icons) {
|
if (wPreferences.auto_arrange_icons)
|
||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
@@ -291,9 +291,7 @@ typedef struct _WScreen {
|
|||||||
char *xdestring;
|
char *xdestring;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
struct NetData *netdata;
|
struct NetData *netdata;
|
||||||
#endif
|
|
||||||
|
|
||||||
int helper_fd;
|
int helper_fd;
|
||||||
pid_t helper_pid;
|
pid_t helper_pid;
|
||||||
|
|||||||
@@ -49,8 +49,6 @@
|
|||||||
|
|
||||||
/* #define CPP_PATH @CPP_PATH@ */
|
/* #define CPP_PATH @CPP_PATH@ */
|
||||||
|
|
||||||
#define NETWM_HINTS
|
|
||||||
|
|
||||||
/* support for XDND drop in the Dock. Experimental */
|
/* support for XDND drop in the Dock. Experimental */
|
||||||
/*#define XDND*/
|
/*#define XDND*/
|
||||||
|
|
||||||
|
|||||||
12
src/window.c
12
src/window.c
@@ -59,9 +59,7 @@
|
|||||||
#ifdef MWM_HINTS
|
#ifdef MWM_HINTS
|
||||||
# include "motif.h"
|
# include "motif.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef NETWM_HINTS
|
#include "wmspec.h"
|
||||||
# include "wmspec.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MOD_MASK wPreferences.modifier_mask
|
#define MOD_MASK wPreferences.modifier_mask
|
||||||
|
|
||||||
@@ -245,10 +243,8 @@ void wWindowDestroy(WWindow *wwin)
|
|||||||
if (wPreferences.auto_arrange_icons)
|
if (wPreferences.auto_arrange_icons)
|
||||||
wArrangeIcons(wwin->screen_ptr, True);
|
wArrangeIcons(wwin->screen_ptr, True);
|
||||||
}
|
}
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
if (wwin->net_icon_image)
|
if (wwin->net_icon_image)
|
||||||
RReleaseImage(wwin->net_icon_image);
|
RReleaseImage(wwin->net_icon_image);
|
||||||
#endif
|
|
||||||
|
|
||||||
wrelease(wwin);
|
wrelease(wwin);
|
||||||
}
|
}
|
||||||
@@ -387,10 +383,8 @@ void wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
|
|||||||
wMWMCheckClientHints(wwin);
|
wMWMCheckClientHints(wwin);
|
||||||
#endif /* MWM_HINTS */
|
#endif /* MWM_HINTS */
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
if (!check)
|
if (!check)
|
||||||
check = wNETWMCheckClientHints(wwin, &tmp_level, &tmp_workspace);
|
check = wNETWMCheckClientHints(wwin, &tmp_level, &tmp_workspace);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* window levels are between INT_MIN+1 and INT_MAX, so if we still
|
/* window levels are between INT_MIN+1 and INT_MAX, so if we still
|
||||||
* have INT_MIN that means that no window level was requested. -Dan
|
* have INT_MIN that means that no window level was requested. -Dan
|
||||||
@@ -883,9 +877,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
|
|||||||
if (WFLAGP(wwin, start_maximized) && IS_RESIZABLE(wwin))
|
if (WFLAGP(wwin, start_maximized) && IS_RESIZABLE(wwin))
|
||||||
wwin->flags.maximized = MAX_VERTICAL | MAX_HORIZONTAL;
|
wwin->flags.maximized = MAX_VERTICAL | MAX_HORIZONTAL;
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMCheckInitialClientState(wwin);
|
wNETWMCheckInitialClientState(wwin);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* apply previous state if it exists and we're in startup */
|
/* apply previous state if it exists and we're in startup */
|
||||||
if (scr->flags.startup && wm_state >= 0) {
|
if (scr->flags.startup && wm_state >= 0) {
|
||||||
@@ -1152,9 +1144,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
|
|||||||
wScreenBringInside(scr, &x, &y, width, height);
|
wScreenBringInside(scr, &x, &y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMPositionSplash(wwin, &x, &y, width, height);
|
wNETWMPositionSplash(wwin, &x, &y, width, height);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (wwin->flags.urgent) {
|
if (wwin->flags.urgent) {
|
||||||
if (!IS_OMNIPRESENT(wwin))
|
if (!IS_OMNIPRESENT(wwin))
|
||||||
|
|||||||
@@ -300,24 +300,19 @@ typedef struct WWindow {
|
|||||||
unsigned int user_changed_width:1;
|
unsigned int user_changed_width:1;
|
||||||
unsigned int user_changed_height:1;
|
unsigned int user_changed_height:1;
|
||||||
unsigned int wm_name_changed:1;
|
unsigned int wm_name_changed:1;
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
unsigned int net_state_from_client:1; /* state hint was set by client */
|
unsigned int net_state_from_client:1; /* state hint was set by client */
|
||||||
unsigned int net_skip_pager:1;
|
unsigned int net_skip_pager:1;
|
||||||
unsigned int net_handle_icon:1;
|
unsigned int net_handle_icon:1;
|
||||||
unsigned int net_show_desktop:1;
|
unsigned int net_show_desktop:1;
|
||||||
unsigned int net_has_title:1; /* use netwm version of WM_NAME */
|
unsigned int net_has_title:1; /* use netwm version of WM_NAME */
|
||||||
unsigned int net_has_icon_title:1;
|
unsigned int net_has_icon_title:1;
|
||||||
#endif
|
|
||||||
} flags; /* state of the window */
|
} flags; /* state of the window */
|
||||||
|
|
||||||
struct WIcon *icon; /* icon info for the window */
|
struct WIcon *icon; /* icon info for the window */
|
||||||
int icon_x, icon_y; /* position of the icon */
|
int icon_x, icon_y; /* position of the icon */
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
int icon_w, icon_h;
|
int icon_w, icon_h;
|
||||||
RImage *net_icon_image;
|
RImage *net_icon_image;
|
||||||
Atom type;
|
Atom type;
|
||||||
#endif
|
|
||||||
} WWindow;
|
} WWindow;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -46,11 +46,7 @@
|
|||||||
#include "winspector.h"
|
#include "winspector.h"
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
#include "wmspec.h"
|
#include "wmspec.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
@@ -828,14 +824,11 @@ static void applySettings(WMButton * button, InspectorPanel * panel)
|
|||||||
wwin->frame->flags.need_texture_change = 1;
|
wwin->frame->flags.need_texture_change = 1;
|
||||||
wWindowConfigureBorders(wwin);
|
wWindowConfigureBorders(wwin);
|
||||||
wFrameWindowPaint(wwin->frame);
|
wFrameWindowPaint(wwin->frame);
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMUpdateActions(wwin, False);
|
wNETWMUpdateActions(wwin, False);
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Can't apply emulate_appicon because it will probably cause problems.
|
* Can't apply emulate_appicon because it will probably cause problems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (wapp) {
|
if (wapp) {
|
||||||
/* do application wide stuff */
|
/* do application wide stuff */
|
||||||
WSETUFLAG(wapp->main_window_desc, start_hidden, WMGetButtonSelected(panel->appChk[0]));
|
WSETUFLAG(wapp->main_window_desc, start_hidden, WMGetButtonSelected(panel->appChk[0]));
|
||||||
|
|||||||
@@ -31,8 +31,6 @@
|
|||||||
|
|
||||||
#include "wconfig.h"
|
#include "wconfig.h"
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/Xarch.h>
|
#include <X11/Xarch.h>
|
||||||
@@ -1646,5 +1644,3 @@ static void wsobserver(void *self, WMNotification * notif)
|
|||||||
updateWorkspaceNames(scr);
|
updateWorkspaceNames(scr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* NETWM_HINTS */
|
|
||||||
|
|||||||
@@ -48,10 +48,7 @@
|
|||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "appicon.h"
|
#include "appicon.h"
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
#include "wmspec.h"
|
#include "wmspec.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
|
||||||
#define MAX_SHORTCUT_LENGTH 32
|
#define MAX_SHORTCUT_LENGTH 32
|
||||||
@@ -122,10 +119,7 @@ int wWorkspaceNew(WScreen * scr)
|
|||||||
wspace->height = scr->scr_height;
|
wspace->height = scr->scr_height;
|
||||||
wspace->width = scr->scr_width;
|
wspace->width = scr->scr_width;
|
||||||
#endif
|
#endif
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMUpdateDesktop(scr);
|
wNETWMUpdateDesktop(scr);
|
||||||
#endif
|
|
||||||
|
|
||||||
WMPostNotificationName(WMNWorkspaceCreated, scr, (void *)(uintptr_t) (scr->workspace_count - 1));
|
WMPostNotificationName(WMNWorkspaceCreated, scr, (void *)(uintptr_t) (scr->workspace_count - 1));
|
||||||
XFlush(dpy);
|
XFlush(dpy);
|
||||||
|
|
||||||
@@ -196,10 +190,7 @@ Bool wWorkspaceDelete(WScreen * scr, int workspace)
|
|||||||
wMenuRemoveItem(menu, --i);
|
wMenuRemoveItem(menu, --i);
|
||||||
wMenuRealize(menu);
|
wMenuRealize(menu);
|
||||||
}
|
}
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMUpdateDesktop(scr);
|
wNETWMUpdateDesktop(scr);
|
||||||
#endif
|
|
||||||
|
|
||||||
WMPostNotificationName(WMNWorkspaceDestroyed, scr, (void *)(uintptr_t) (scr->workspace_count - 1));
|
WMPostNotificationName(WMNWorkspaceDestroyed, scr, (void *)(uintptr_t) (scr->workspace_count - 1));
|
||||||
|
|
||||||
if (scr->current_workspace >= scr->workspace_count)
|
if (scr->current_workspace >= scr->workspace_count)
|
||||||
@@ -616,11 +607,8 @@ void wWorkspaceForceChange(WScreen * scr, int workspace)
|
|||||||
wClipIconPaint(scr->clip_icon);
|
wClipIconPaint(scr->clip_icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wScreenUpdateUsableArea(scr);
|
wScreenUpdateUsableArea(scr);
|
||||||
wNETWMUpdateDesktop(scr);
|
wNETWMUpdateDesktop(scr);
|
||||||
#endif
|
|
||||||
|
|
||||||
showWorkspaceName(scr, workspace);
|
showWorkspaceName(scr, workspace);
|
||||||
|
|
||||||
WMPostNotificationName(WMNWorkspaceChanged, scr, (void *)(uintptr_t) workspace);
|
WMPostNotificationName(WMNWorkspaceChanged, scr, (void *)(uintptr_t) workspace);
|
||||||
@@ -1159,9 +1147,7 @@ Bool wWorkspaceSetViewport(WScreen * scr, int workspace, int view_x, int view_y)
|
|||||||
wptr->view_x = view_x;
|
wptr->view_x = view_x;
|
||||||
wptr->view_y = view_y;
|
wptr->view_y = view_y;
|
||||||
|
|
||||||
#ifdef NETWM_HINTS
|
|
||||||
wNETWMUpdateDesktop(scr);
|
wNETWMUpdateDesktop(scr);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (wwin = scr->focused_window; wwin; wwin = wwin->prev) {
|
for (wwin = scr->focused_window; wwin; wwin = wwin->prev) {
|
||||||
if (wwin->frame->workspace == workspace && !IS_VSTUCK(wwin)) {
|
if (wwin->frame->workspace == workspace && !IS_VSTUCK(wwin)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user