mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
added icon tile hint
other stuff
This commit is contained in:
@@ -70,7 +70,6 @@ GFXLIBS = @GFXLIBS@
|
|||||||
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
|
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
|
||||||
ICONEXT = @ICONEXT@
|
ICONEXT = @ICONEXT@
|
||||||
INTLIBS = @INTLIBS@
|
INTLIBS = @INTLIBS@
|
||||||
LD = @LD@
|
|
||||||
LIBPL = @LIBPL@
|
LIBPL = @LIBPL@
|
||||||
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
|
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
@@ -80,7 +79,6 @@ MAKEINFO = @MAKEINFO@
|
|||||||
MOFILES = @MOFILES@
|
MOFILES = @MOFILES@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NLSDIR = @NLSDIR@
|
NLSDIR = @NLSDIR@
|
||||||
NM = @NM@
|
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
@@ -92,6 +90,7 @@ XLFLAGS = @XLFLAGS@
|
|||||||
XLIBS = @XLIBS@
|
XLIBS = @XLIBS@
|
||||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||||
X_LIBRARY_PATH = @X_LIBRARY_PATH@
|
X_LIBRARY_PATH = @X_LIBRARY_PATH@
|
||||||
|
supported_locales = @supported_locales@
|
||||||
wprefsdir = @wprefsdir@
|
wprefsdir = @wprefsdir@
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = no-dependencies
|
AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|||||||
@@ -399,10 +399,6 @@ typedef struct WPreferences {
|
|||||||
char appicon_balloon;
|
char appicon_balloon;
|
||||||
char help_balloon;
|
char help_balloon;
|
||||||
|
|
||||||
#ifdef WEENDOZE_CYCLE
|
|
||||||
char windoze_cycling; /* Windoze 95 style Alt+Tabbing */
|
|
||||||
char popup_switchmenu; /* Popup the switchmenu when Alt+Tabbing */
|
|
||||||
#endif /* WEENDOZE_CYCLE */
|
|
||||||
/* some constants */
|
/* some constants */
|
||||||
int dblclick_time; /* double click delay time in ms */
|
int dblclick_time; /* double click delay time in ms */
|
||||||
|
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ wUnshadeWindow(WWindow *wwin)
|
|||||||
+ wwin->frame->bottom_width) {
|
+ wwin->frame->bottom_width) {
|
||||||
XResizeWindow(dpy, wwin->frame->core->window, w, h);
|
XResizeWindow(dpy, wwin->frame->core->window, w, h);
|
||||||
XMoveWindow(dpy, wwin->client_win, 0, y);
|
XMoveWindow(dpy, wwin->client_win, 0, y);
|
||||||
XSync(dpy, 0);
|
XFlush(dpy);
|
||||||
if (SHADE_DELAY > 0)
|
if (SHADE_DELAY > 0)
|
||||||
wusleep(SHADE_DELAY*2000L/3);
|
wusleep(SHADE_DELAY*2000L/3);
|
||||||
h+=s;
|
h+=s;
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
|
#include "properties.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -86,6 +87,9 @@ extern WDDomain *WDRootMenu;
|
|||||||
|
|
||||||
extern int wScreenCount;
|
extern int wScreenCount;
|
||||||
|
|
||||||
|
extern Atom _XA_WINDOWMAKER_ICON_SIZE;
|
||||||
|
extern Atom _XA_WINDOWMAKER_ICON_TILE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
extern proplist_t wDomainName;
|
extern proplist_t wDomainName;
|
||||||
extern proplist_t wAttributeDomainName;
|
extern proplist_t wAttributeDomainName;
|
||||||
@@ -521,14 +525,6 @@ WDefaultEntry optionList[] = {
|
|||||||
{"DisableBlinking", "NO", NULL,
|
{"DisableBlinking", "NO", NULL,
|
||||||
&wPreferences.dont_blink, getBool, NULL
|
&wPreferences.dont_blink, getBool, NULL
|
||||||
},
|
},
|
||||||
#ifdef WEENDOZE_CYCLE
|
|
||||||
{"WindozeCycling","NO", NULL,
|
|
||||||
&wPreferences.windoze_cycling, getBool, NULL
|
|
||||||
},
|
|
||||||
{"PopupSwitchMenu","YES", NULL,
|
|
||||||
&wPreferences.popup_switchmenu, getBool, NULL
|
|
||||||
},
|
|
||||||
#endif /* WEENDOZE_CYCLE */
|
|
||||||
/* style options */
|
/* style options */
|
||||||
{"MenuStyle", "normal", seMenuStyles,
|
{"MenuStyle", "normal", seMenuStyles,
|
||||||
&wPreferences.menu_style, getEnum, setMenuStyle
|
&wPreferences.menu_style, getEnum, setMenuStyle
|
||||||
@@ -2485,6 +2481,11 @@ setIconTile(WScreen *scr, WDefaultEntry *entry, WTexture **texture, void *foo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
scr->icon_tile = img;
|
scr->icon_tile = img;
|
||||||
|
|
||||||
|
|
||||||
|
/* put the icon in the noticeboard hint */
|
||||||
|
PropSetIconTileHint(scr, img);
|
||||||
|
|
||||||
|
|
||||||
if (!wPreferences.flags.noclip) {
|
if (!wPreferences.flags.noclip) {
|
||||||
if (scr->clip_tile) {
|
if (scr->clip_tile) {
|
||||||
|
|||||||
@@ -1677,7 +1677,7 @@ drawGNUstepLogo(Display *dpy, Drawable d, int width, int height,
|
|||||||
"implementation of the OpenStep(tm) specification\n"\
|
"implementation of the OpenStep(tm) specification\n"\
|
||||||
"which is a object-oriented framework for\n"\
|
"which is a object-oriented framework for\n"\
|
||||||
"creating advanced graphical, multi-platform\n"\
|
"creating advanced graphical, multi-platform\n"\
|
||||||
"applications. Aditionally, a development and\n"\
|
"applications. Additionally, a development and\n"\
|
||||||
"user desktop enviroment will be created on top\n"\
|
"user desktop enviroment will be created on top\n"\
|
||||||
"of the framework. For more information about\n"\
|
"of the framework. For more information about\n"\
|
||||||
"GNUstep, please visit: www.gnustep.org"
|
"GNUstep, please visit: www.gnustep.org"
|
||||||
|
|||||||
20
src/dock.c
20
src/dock.c
@@ -3441,6 +3441,13 @@ openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
|
|||||||
wMenuRealize(dock->menu);
|
wMenuRealize(dock->menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (aicon->icon->owner) {
|
||||||
|
wapp = wApplicationOf(aicon->icon->owner->main_window);
|
||||||
|
} else {
|
||||||
|
wapp = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* launch */
|
/* launch */
|
||||||
entry = dock->menu->entries[++index];
|
entry = dock->menu->entries[++index];
|
||||||
entry->clientdata = aicon;
|
entry->clientdata = aicon;
|
||||||
@@ -3449,17 +3456,18 @@ openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
|
|||||||
/* unhide here */
|
/* unhide here */
|
||||||
entry = dock->menu->entries[++index];
|
entry = dock->menu->entries[++index];
|
||||||
entry->clientdata = aicon;
|
entry->clientdata = aicon;
|
||||||
|
if (wapp && wapp->flags.hidden) {
|
||||||
|
entry->text = _("Unhide Here");
|
||||||
|
} else {
|
||||||
|
entry->text = _("Bring Here");
|
||||||
|
}
|
||||||
wMenuSetEnabled(dock->menu, index, appIsRunning);
|
wMenuSetEnabled(dock->menu, index, appIsRunning);
|
||||||
|
|
||||||
/* hide */
|
/* hide */
|
||||||
entry = dock->menu->entries[++index];
|
entry = dock->menu->entries[++index];
|
||||||
entry->clientdata = aicon;
|
entry->clientdata = aicon;
|
||||||
if (aicon->icon->owner) {
|
if (wapp && wapp->flags.hidden) {
|
||||||
wapp = wApplicationOf(aicon->icon->owner->main_window);
|
entry->text = _("Unhide");
|
||||||
if (wapp && wapp->flags.hidden)
|
|
||||||
entry->text = _("Unhide");
|
|
||||||
else
|
|
||||||
entry->text = _("Hide");
|
|
||||||
} else {
|
} else {
|
||||||
entry->text = _("Hide");
|
entry->text = _("Hide");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,7 +293,10 @@ ShowDockAppSettingsPanel(WAppIcon *aicon)
|
|||||||
font = WMBoldSystemFontOfSize(scr->wmscreen, 14);
|
font = WMBoldSystemFontOfSize(scr->wmscreen, 14);
|
||||||
WMSetLabelFont(panel->nameLabel, font);
|
WMSetLabelFont(panel->nameLabel, font);
|
||||||
WMReleaseFont(font);
|
WMReleaseFont(font);
|
||||||
WMSetLabelText(panel->nameLabel, aicon->wm_class);
|
if (aicon->wm_class && strcmp(aicon->wm_class, "DockApp")==0)
|
||||||
|
WMSetLabelText(panel->nameLabel, aicon->wm_instance);
|
||||||
|
else
|
||||||
|
WMSetLabelText(panel->nameLabel, aicon->wm_class);
|
||||||
|
|
||||||
panel->autoLaunchBtn = WMCreateSwitchButton(panel->win);
|
panel->autoLaunchBtn = WMCreateSwitchButton(panel->win);
|
||||||
WMResizeWidget(panel->autoLaunchBtn, PWIDTH-30, 20);
|
WMResizeWidget(panel->autoLaunchBtn, PWIDTH-30, 20);
|
||||||
|
|||||||
181
src/event.c
181
src/event.c
@@ -592,7 +592,6 @@ handleExpose(XEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* bindable */
|
/* bindable */
|
||||||
static void
|
static void
|
||||||
handleButtonPress(XEvent *event)
|
handleButtonPress(XEvent *event)
|
||||||
@@ -610,8 +609,7 @@ handleButtonPress(XEvent *event)
|
|||||||
|
|
||||||
|
|
||||||
#ifndef LITE
|
#ifndef LITE
|
||||||
if (event->xbutton.window==scr->root_win) {
|
if (event->xbutton.window==scr->root_win) {
|
||||||
|
|
||||||
if (event->xbutton.button==wPreferences.menu_button) {
|
if (event->xbutton.button==wPreferences.menu_button) {
|
||||||
OpenRootMenu(scr, event->xbutton.x_root,
|
OpenRootMenu(scr, event->xbutton.x_root,
|
||||||
event->xbutton.y_root, False);
|
event->xbutton.y_root, False);
|
||||||
@@ -1272,67 +1270,6 @@ windowUnderPointer(WScreen *scr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef WEENDOZE_CYCLE
|
|
||||||
|
|
||||||
static WWindow*
|
|
||||||
nextToFocusAfter(WWindow *wwin)
|
|
||||||
{
|
|
||||||
WWindow *tmp = wwin->prev;
|
|
||||||
|
|
||||||
while (tmp) {
|
|
||||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
tmp = tmp->prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = wwin;
|
|
||||||
/* start over from the beginning of the list */
|
|
||||||
while (tmp->next)
|
|
||||||
tmp = tmp->next;
|
|
||||||
|
|
||||||
while (tmp && tmp != wwin) {
|
|
||||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
tmp = tmp->prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
return wwin;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static WWindow*
|
|
||||||
nextToFocusBefore(WWindow *wwin)
|
|
||||||
{
|
|
||||||
WWindow *tmp = wwin->next;
|
|
||||||
|
|
||||||
while (tmp) {
|
|
||||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* start over from the beginning of the list */
|
|
||||||
tmp = wwin;
|
|
||||||
while (tmp->prev)
|
|
||||||
tmp = tmp->prev;
|
|
||||||
|
|
||||||
while (tmp && tmp != wwin) {
|
|
||||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return wwin;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1356,30 +1293,32 @@ doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
|||||||
CurrentTime);
|
CurrentTime);
|
||||||
|
|
||||||
if (next) {
|
if (next) {
|
||||||
newFocused = nextToFocusAfter(wwin);
|
newFocused = NextToFocusAfter(wwin);
|
||||||
} else {
|
} else {
|
||||||
newFocused = nextToFocusBefore(wwin);
|
newFocused = NextToFocusBefore(wwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
scr->flags.doing_alt_tab = 1;
|
scr->flags.doing_alt_tab = 1;
|
||||||
|
|
||||||
|
|
||||||
|
XRaiseWindow(dpy, newFocused->frame->core->window);
|
||||||
wWindowFocus(newFocused, scr->focused_window);
|
wWindowFocus(newFocused, scr->focused_window);
|
||||||
oldFocused = newFocused;
|
oldFocused = newFocused;
|
||||||
if (wPreferences.circ_raise)
|
if (wPreferences.circ_raise)
|
||||||
wRaiseFrame(newFocused->frame->core);
|
wRaiseFrame(newFocused->frame->core);
|
||||||
|
#if 0
|
||||||
if (wPreferences.popup_switchmenu &&
|
if (wPreferences.popup_switchmenu &&
|
||||||
(!scr->switch_menu || !scr->switch_menu->flags.mapped)) {
|
(!scr->switch_menu || !scr->switch_menu->flags.mapped)) {
|
||||||
|
|
||||||
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
||||||
openedSwitchMenu = True;
|
openedSwitchMenu = True;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
while (!done) {
|
while (!done) {
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
WMMaskEvent(dpy,KeyPressMask|KeyReleaseMask|ExposureMask, &ev);
|
WMMaskEvent(dpy,KeyPressMask|KeyReleaseMask|ExposureMask, &ev);
|
||||||
/* WMNextEvent(dpy, &ev);*/
|
|
||||||
if (ev.type != KeyRelease && ev.type != KeyPress) {
|
if (ev.type != KeyRelease && ev.type != KeyPress) {
|
||||||
WMHandleEvent(&ev);
|
WMHandleEvent(&ev);
|
||||||
continue;
|
continue;
|
||||||
@@ -1387,31 +1326,46 @@ doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
|||||||
/* ignore CapsLock */
|
/* ignore CapsLock */
|
||||||
modifiers = ev.xkey.state & ValidModMask;
|
modifiers = ev.xkey.state & ValidModMask;
|
||||||
|
|
||||||
if (ev.type == KeyPress
|
if (ev.type == KeyPress) {
|
||||||
&& wKeyBindings[WKBD_FOCUSNEXT].keycode == ev.xkey.keycode
|
if (wKeyBindings[WKBD_FOCUSNEXT].keycode == ev.xkey.keycode
|
||||||
&& wKeyBindings[WKBD_FOCUSNEXT].modifier == modifiers) {
|
&& wKeyBindings[WKBD_FOCUSNEXT].modifier == modifiers) {
|
||||||
|
|
||||||
|
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||||
|
newFocused = NextToFocusAfter(newFocused);
|
||||||
|
wWindowFocus(newFocused, oldFocused);
|
||||||
|
oldFocused = newFocused;
|
||||||
|
|
||||||
|
/* restore order */
|
||||||
|
CommitStacking(scr);
|
||||||
|
XRaiseWindow(dpy, newFocused->frame->core->window);
|
||||||
|
|
||||||
|
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||||
|
|
||||||
|
} else if (wKeyBindings[WKBD_FOCUSPREV].keycode == ev.xkey.keycode
|
||||||
|
&& wKeyBindings[WKBD_FOCUSPREV].modifier == modifiers) {
|
||||||
|
|
||||||
|
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||||
|
newFocused = NextToFocusBefore(newFocused);
|
||||||
|
wWindowFocus(newFocused, oldFocused);
|
||||||
|
oldFocused = newFocused;
|
||||||
|
|
||||||
|
/* restore order */
|
||||||
|
CommitStacking(scr);
|
||||||
|
XRaiseWindow(dpy, newFocused->frame->core->window);
|
||||||
|
|
||||||
|
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||||
|
|
||||||
|
} else if (wKeyBindings[WKBD_LOWER].keycode == ev.xkey.keycode
|
||||||
|
&& wKeyBindings[WKBD_LOWER].modifier == modifiers) {
|
||||||
|
|
||||||
|
wLowerFrame(newFocused->frame->core);
|
||||||
|
|
||||||
|
} else if (wKeyBindings[WKBD_RAISE].keycode == ev.xkey.keycode
|
||||||
|
&& wKeyBindings[WKBD_RAISE].modifier == modifiers) {
|
||||||
|
|
||||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
|
||||||
newFocused = nextToFocusAfter(newFocused);
|
|
||||||
wWindowFocus(newFocused, oldFocused);
|
|
||||||
oldFocused = newFocused;
|
|
||||||
if (wPreferences.circ_raise)
|
|
||||||
wRaiseFrame(newFocused->frame->core);
|
wRaiseFrame(newFocused->frame->core);
|
||||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
}
|
||||||
|
} else if (ev.type == KeyRelease) {
|
||||||
} else if (ev.type == KeyPress
|
|
||||||
&& wKeyBindings[WKBD_FOCUSPREV].keycode == ev.xkey.keycode
|
|
||||||
&& wKeyBindings[WKBD_FOCUSPREV].modifier == modifiers) {
|
|
||||||
|
|
||||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
|
||||||
newFocused = nextToFocusBefore(newFocused);
|
|
||||||
wWindowFocus(newFocused, oldFocused);
|
|
||||||
oldFocused = newFocused;
|
|
||||||
if (wPreferences.circ_raise)
|
|
||||||
wRaiseFrame(newFocused->frame->core);
|
|
||||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
|
||||||
}
|
|
||||||
if (ev.type == KeyRelease) {
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i <= 8 * keymap->max_keypermod; i++) {
|
for (i = 0; i <= 8 * keymap->max_keypermod; i++) {
|
||||||
@@ -1426,17 +1380,21 @@ doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
|||||||
}
|
}
|
||||||
XFree(keymap);
|
XFree(keymap);
|
||||||
|
|
||||||
|
/* restore order */
|
||||||
|
CommitStacking(scr);
|
||||||
|
|
||||||
XUngrabKeyboard(dpy, CurrentTime);
|
XUngrabKeyboard(dpy, CurrentTime);
|
||||||
wSetFocusTo(scr, newFocused);
|
wSetFocusTo(scr, newFocused);
|
||||||
scr->flags.doing_alt_tab = 0;
|
|
||||||
|
if (wPreferences.circ_raise)
|
||||||
|
wRaiseFrame(newFocused->frame->core);
|
||||||
|
|
||||||
|
scr->flags.doing_alt_tab = 0;
|
||||||
if (openedSwitchMenu)
|
if (openedSwitchMenu)
|
||||||
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* WEENDOZE_CYCLE */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1465,6 +1423,7 @@ handleKeyPress(XEvent *event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (command < 0) {
|
if (command < 0) {
|
||||||
#ifdef LITE
|
#ifdef LITE
|
||||||
@@ -1608,35 +1567,11 @@ handleKeyPress(XEvent *event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WKBD_FOCUSNEXT:
|
case WKBD_FOCUSNEXT:
|
||||||
#ifdef WEENDOZE_CYCLE
|
doWindozeCycle(wwin, event, True);
|
||||||
if (wPreferences.windoze_cycling) {
|
|
||||||
doWindozeCycle(wwin, event, True);
|
|
||||||
} else
|
|
||||||
#endif /* WEENDOZE_CYCLE */
|
|
||||||
{
|
|
||||||
wwin = NextFocusWindow(scr);
|
|
||||||
if (wwin != NULL) {
|
|
||||||
wSetFocusTo(scr, wwin);
|
|
||||||
if (wPreferences.circ_raise)
|
|
||||||
wRaiseFrame(wwin->frame->core);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WKBD_FOCUSPREV:
|
case WKBD_FOCUSPREV:
|
||||||
#ifdef WEENDOZE_CYCLE
|
doWindozeCycle(wwin, event, False);
|
||||||
if (wPreferences.windoze_cycling) {
|
|
||||||
doWindozeCycle(wwin, event, False);
|
|
||||||
} else
|
|
||||||
#endif /* WEENDOZE_CYCLE */
|
|
||||||
{
|
|
||||||
wwin = PrevFocusWindow(scr);
|
|
||||||
if (wwin != NULL) {
|
|
||||||
wSetFocusTo(scr, wwin);
|
|
||||||
if (wPreferences.circ_raise)
|
|
||||||
wRaiseFrame(wwin->frame->core);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
|
#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
|
||||||
|
|||||||
@@ -106,8 +106,8 @@ void StartLogShell(WScreen *scr);
|
|||||||
|
|
||||||
Bool IsDoubleClick(WScreen *scr, XEvent *event);
|
Bool IsDoubleClick(WScreen *scr, XEvent *event);
|
||||||
|
|
||||||
WWindow *NextFocusWindow(WScreen *scr);
|
WWindow *NextToFocusAfter(WWindow *wwin);
|
||||||
WWindow *PrevFocusWindow(WScreen *scr);
|
WWindow *NextToFocusBefore(WWindow *wwin);
|
||||||
|
|
||||||
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
|
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,10 @@ Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
|||||||
Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||||
Atom _XA_WINDOWMAKER_COMMAND;
|
Atom _XA_WINDOWMAKER_COMMAND;
|
||||||
|
|
||||||
|
Atom _XA_WINDOWMAKER_ICON_SIZE;
|
||||||
|
Atom _XA_WINDOWMAKER_ICON_TILE;
|
||||||
|
|
||||||
|
|
||||||
#ifdef OFFIX_DND
|
#ifdef OFFIX_DND
|
||||||
Atom _XA_DND_PROTOCOL;
|
Atom _XA_DND_PROTOCOL;
|
||||||
Atom _XA_DND_SELECTION;
|
Atom _XA_DND_SELECTION;
|
||||||
|
|||||||
99
src/misc.c
99
src/misc.c
@@ -200,69 +200,64 @@ MakeCPPArgs(char *path)
|
|||||||
#endif /* USECPP */
|
#endif /* USECPP */
|
||||||
|
|
||||||
|
|
||||||
WWindow*
|
|
||||||
NextFocusWindow(WScreen *scr)
|
|
||||||
{
|
|
||||||
WWindow *tmp, *wwin, *closest, *min;
|
|
||||||
Window d;
|
|
||||||
|
|
||||||
if (!(wwin = scr->focused_window))
|
|
||||||
return NULL;
|
|
||||||
tmp = wwin->prev;
|
WWindow*
|
||||||
closest = NULL;
|
NextToFocusAfter(WWindow *wwin)
|
||||||
min = wwin;
|
{
|
||||||
d = 0xffffffff;
|
WWindow *tmp = wwin->prev;
|
||||||
|
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
if (wWindowCanReceiveFocus(tmp)
|
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||||
&& (!WFLAGP(tmp, skip_window_list)|| tmp->flags.internal_window)) {
|
return tmp;
|
||||||
if (min->client_win > tmp->client_win)
|
|
||||||
min = tmp;
|
|
||||||
if (tmp->client_win > wwin->client_win
|
|
||||||
&& (!closest
|
|
||||||
|| (tmp->client_win - wwin->client_win) < d)) {
|
|
||||||
closest = tmp;
|
|
||||||
d = tmp->client_win - wwin->client_win;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
tmp = tmp->prev;
|
tmp = tmp->prev;
|
||||||
}
|
}
|
||||||
if (!closest||closest==wwin)
|
|
||||||
return min;
|
tmp = wwin;
|
||||||
return closest;
|
/* start over from the beginning of the list */
|
||||||
|
while (tmp->next)
|
||||||
|
tmp = tmp->next;
|
||||||
|
|
||||||
|
while (tmp && tmp != wwin) {
|
||||||
|
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
tmp = tmp->prev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wwin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WWindow*
|
WWindow*
|
||||||
PrevFocusWindow(WScreen *scr)
|
NextToFocusBefore(WWindow *wwin)
|
||||||
{
|
{
|
||||||
WWindow *tmp, *wwin, *closest, *max;
|
WWindow *tmp = wwin->next;
|
||||||
Window d;
|
|
||||||
|
|
||||||
if (!(wwin = scr->focused_window))
|
|
||||||
return NULL;
|
|
||||||
tmp = wwin->prev;
|
|
||||||
closest = NULL;
|
|
||||||
max = wwin;
|
|
||||||
d = 0xffffffff;
|
|
||||||
while (tmp) {
|
|
||||||
if (wWindowCanReceiveFocus(tmp) &&
|
|
||||||
(!WFLAGP(tmp, skip_window_list) || tmp->flags.internal_window)) {
|
|
||||||
if (max->client_win < tmp->client_win)
|
|
||||||
max = tmp;
|
|
||||||
if (tmp->client_win < wwin->client_win
|
|
||||||
&& (!closest
|
|
||||||
|| (wwin->client_win - tmp->client_win) < d)) {
|
|
||||||
closest = tmp;
|
|
||||||
d = wwin->client_win - tmp->client_win;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tmp = tmp->prev;
|
|
||||||
}
|
|
||||||
if (!closest||closest==wwin)
|
|
||||||
return max;
|
|
||||||
return closest;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
while (tmp) {
|
||||||
|
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* start over from the beginning of the list */
|
||||||
|
tmp = wwin;
|
||||||
|
while (tmp->prev)
|
||||||
|
tmp = tmp->prev;
|
||||||
|
|
||||||
|
while (tmp && tmp != wwin) {
|
||||||
|
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||||
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wwin;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
|||||||
extern Atom _XA_WINDOWMAKER_MENU;
|
extern Atom _XA_WINDOWMAKER_MENU;
|
||||||
extern Atom _XA_WINDOWMAKER_WM_PROTOCOLS;
|
extern Atom _XA_WINDOWMAKER_WM_PROTOCOLS;
|
||||||
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||||
|
extern Atom _XA_WINDOWMAKER_ICON_TILE;
|
||||||
|
extern Atom _XA_WINDOWMAKER_ICON_SIZE;
|
||||||
|
|
||||||
int
|
int
|
||||||
PropGetNormalHints(Window window, XSizeHints *size_hints, int *pre_iccm)
|
PropGetNormalHints(Window window, XSizeHints *size_hints, int *pre_iccm)
|
||||||
@@ -200,6 +202,59 @@ PropSetWMakerProtocols(Window root)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
PropSetIconTileHint(WScreen *scr, RImage *image)
|
||||||
|
{
|
||||||
|
static Atom imageAtom = 0;
|
||||||
|
unsigned char *tmp;
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
if (scr->info_window == None)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!imageAtom) {
|
||||||
|
/*
|
||||||
|
* WIDTH, HEIGHT (16 bits, MSB First)
|
||||||
|
* array of R,G,B,A bytes
|
||||||
|
*/
|
||||||
|
imageAtom = XInternAtom(dpy, "_RGBA_IMAGE", False);
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = malloc(image->width * image->height * 4 + 4);
|
||||||
|
if (!tmp) {
|
||||||
|
wwarning("could not allocate memory to set _WINDOWMAKER_ICON_TILE hint");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp[0] = image->width>>8;
|
||||||
|
tmp[1] = image->width&0xff;
|
||||||
|
tmp[2] = image->height>>8;
|
||||||
|
tmp[3] = image->height&0xff;
|
||||||
|
|
||||||
|
if (image->format == RRGBAFormat) {
|
||||||
|
memcpy(image->data, &tmp[4], image->width*image->height*4);
|
||||||
|
} else {
|
||||||
|
char *ptr = tmp+4;
|
||||||
|
char *src = image->data;
|
||||||
|
|
||||||
|
for (y = 0; y < image->height; y++) {
|
||||||
|
for (x = 0; x < image->width; x++) {
|
||||||
|
*ptr++ = *src++;
|
||||||
|
*ptr++ = *src++;
|
||||||
|
*ptr++ = *src++;
|
||||||
|
*ptr++ = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XChangeProperty(dpy, scr->info_window, _XA_WINDOWMAKER_ICON_TILE,
|
||||||
|
imageAtom, 8, PropModeReplace, tmp,
|
||||||
|
image->width * image->height * 4 + 4);
|
||||||
|
free(tmp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Window
|
Window
|
||||||
PropGetClientLeader(Window window)
|
PropGetClientLeader(Window window)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ void PropWriteGNUstepWMAttr(Window window, GNUstepWMAttributes *attr);
|
|||||||
|
|
||||||
void PropSetWMakerProtocols(Window root);
|
void PropSetWMakerProtocols(Window root);
|
||||||
void PropCleanUp(Window root);
|
void PropCleanUp(Window root);
|
||||||
|
void PropSetIconTileHint(WScreen *scr, RImage *image);
|
||||||
|
|
||||||
Window PropGetClientLeader(Window window);
|
Window PropGetClientLeader(Window window);
|
||||||
|
|
||||||
|
|||||||
15
src/screen.c
15
src/screen.c
@@ -551,13 +551,6 @@ createInternalWindows(WScreen *scr)
|
|||||||
XCreateWindow(dpy, scr->root_win, 0, 0, 10, 10, 0, scr->w_depth,
|
XCreateWindow(dpy, scr->root_win, 0, 0, 10, 10, 0, scr->w_depth,
|
||||||
CopyFromParent, scr->w_visual, vmask, &attribs);
|
CopyFromParent, scr->w_visual, vmask, &attribs);
|
||||||
|
|
||||||
|
|
||||||
/* for our window manager info notice board */
|
|
||||||
scr->info_window =
|
|
||||||
XCreateWindow(dpy, scr->root_win, 0, 0, 10, 10, 0, CopyFromParent,
|
|
||||||
CopyFromParent, CopyFromParent, CWOverrideRedirect,
|
|
||||||
&attribs);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the window is clicked without having ButtonPress selected, the
|
* If the window is clicked without having ButtonPress selected, the
|
||||||
* resulting event will have event.xbutton.window == root.
|
* resulting event will have event.xbutton.window == root.
|
||||||
@@ -799,6 +792,13 @@ wScreenInit(int screen_number)
|
|||||||
/* create GCs with default values */
|
/* create GCs with default values */
|
||||||
allocGCs(scr);
|
allocGCs(scr);
|
||||||
|
|
||||||
|
|
||||||
|
/* for our window manager info notice board. Need to
|
||||||
|
* create before reading the defaults, because it will be used there.
|
||||||
|
*/
|
||||||
|
scr->info_window = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, 10, 10,
|
||||||
|
0, 0, 0);
|
||||||
|
|
||||||
/* read defaults for this screen */
|
/* read defaults for this screen */
|
||||||
wReadDefaults(scr, WDWindowMaker->dictionary);
|
wReadDefaults(scr, WDWindowMaker->dictionary);
|
||||||
|
|
||||||
@@ -856,7 +856,6 @@ wScreenInit(int screen_number)
|
|||||||
|
|
||||||
wScreenUpdateUsableArea(scr);
|
wScreenUpdateUsableArea(scr);
|
||||||
|
|
||||||
|
|
||||||
return scr;
|
return scr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ typedef struct _WScreen {
|
|||||||
/* some client has issued a WM_COLORMAP_NOTIFY */
|
/* some client has issued a WM_COLORMAP_NOTIFY */
|
||||||
unsigned int colormap_stuff_blocked:1;
|
unsigned int colormap_stuff_blocked:1;
|
||||||
unsigned int doing_alt_tab:1;
|
unsigned int doing_alt_tab:1;
|
||||||
unsigned int jump_back_pending:1;
|
unsigned int jump_back_pending:1;
|
||||||
#ifdef KWM_HINTS
|
#ifdef KWM_HINTS
|
||||||
unsigned int kwm_syncing_name:1;
|
unsigned int kwm_syncing_name:1;
|
||||||
unsigned int kwm_syncing_count:1;
|
unsigned int kwm_syncing_count:1;
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ extern Atom _XA_WINDOWMAKER_STATE;
|
|||||||
extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
||||||
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||||
extern Atom _XA_WINDOWMAKER_COMMAND;
|
extern Atom _XA_WINDOWMAKER_COMMAND;
|
||||||
|
extern Atom _XA_WINDOWMAKER_ICON_SIZE;
|
||||||
|
extern Atom _XA_WINDOWMAKER_ICON_TILE;
|
||||||
|
|
||||||
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||||
|
|
||||||
@@ -643,7 +645,9 @@ static char *atomNames[] = {
|
|||||||
GNUSTEP_WM_MINIATURIZE_WINDOW,
|
GNUSTEP_WM_MINIATURIZE_WINDOW,
|
||||||
"_WINDOWMAKER_WM_FUNCTION",
|
"_WINDOWMAKER_WM_FUNCTION",
|
||||||
"_WINDOWMAKER_NOTICEBOARD",
|
"_WINDOWMAKER_NOTICEBOARD",
|
||||||
"_WINDOWMAKER_COMMAND"
|
"_WINDOWMAKER_COMMAND",
|
||||||
|
"_WINDOWMAKER_ICON_SIZE",
|
||||||
|
"_WINDOWMAKER_ICON_TILE"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -713,6 +717,8 @@ StartUp(Bool defaultScreenOnly)
|
|||||||
|
|
||||||
_XA_WINDOWMAKER_COMMAND = atom[16];
|
_XA_WINDOWMAKER_COMMAND = atom[16];
|
||||||
|
|
||||||
|
_XA_WINDOWMAKER_ICON_SIZE = atom[17];
|
||||||
|
_XA_WINDOWMAKER_ICON_TILE = atom[18];
|
||||||
|
|
||||||
#ifdef OFFIX_DND
|
#ifdef OFFIX_DND
|
||||||
_XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False);
|
_XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False);
|
||||||
|
|||||||
@@ -49,14 +49,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #define to enable WindozeCycling. Set WindozeCycling = YES in
|
|
||||||
* your WindowMaker config file
|
|
||||||
* WARNING: this still has some bugs
|
|
||||||
*/
|
|
||||||
#undef WEENDOZE_CYCLE
|
|
||||||
|
|
||||||
|
|
||||||
/* undefine ANIMATIONS if you don't want animations for iconification,
|
/* undefine ANIMATIONS if you don't want animations for iconification,
|
||||||
* shading, icon arrangement etc. */
|
* shading, icon arrangement etc. */
|
||||||
#define ANIMATIONS
|
#define ANIMATIONS
|
||||||
|
|||||||
@@ -248,6 +248,8 @@ typedef struct WWindow {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* info flags */
|
/* info flags */
|
||||||
|
unsigned int is_gnustep:1;
|
||||||
|
|
||||||
unsigned int buttons_dont_fit:1;
|
unsigned int buttons_dont_fit:1;
|
||||||
unsigned int rebuild_texture:1;/* the window was resized and
|
unsigned int rebuild_texture:1;/* the window was resized and
|
||||||
* gradients should be re-rendered */
|
* gradients should be re-rendered */
|
||||||
|
|||||||
Reference in New Issue
Block a user