mirror of
https://github.com/gryf/gryf-overlay.git
synced 2026-02-22 02:55:52 +01:00
Patch for Window Maker which enables moving windows to another head
This commit is contained in:
@@ -1,222 +0,0 @@
|
||||
--- WindowMaker-0.91.0/WPrefs.app/Expert.c 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/WPrefs.app/Expert.c 2005-05-21 16:10:41.000000000 -0700
|
||||
@@ -54,9 +54,10 @@
|
||||
WMSetButtonSelected(panel->swi[4], GetBoolForKey("DontConfirmKill"));
|
||||
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking"));
|
||||
WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText"));
|
||||
+ WMSetButtonSelected(panel->swi[7], GetBoolForKey("DCMaximize"));
|
||||
+ WMSetButtonSelected(panel->swi[8], GetBoolForKey("SingleClickLaunch"));
|
||||
}
|
||||
|
||||
-
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
@@ -66,10 +67,10 @@
|
||||
panel->box = WMCreateBox(panel->parent);
|
||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||
|
||||
- for (i=0; i<7; i++) {
|
||||
+ for (i=0; i<9; i++) {
|
||||
panel->swi[i] = WMCreateSwitchButton(panel->box);
|
||||
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
|
||||
- WMMoveWidget(panel->swi[i], 20, 20+i*25);
|
||||
+ WMMoveWidget(panel->swi[i], 20, 20+i*23);
|
||||
}
|
||||
|
||||
WMSetButtonText(panel->swi[0], _("Disable miniwindows (icons for minimized windows). For use with KDE/GNOME."));
|
||||
@@ -81,6 +82,9 @@
|
||||
WMSetButtonText(panel->swi[6], _("Smooth font edges (needs restart)."));
|
||||
|
||||
WMSetButtonEnabled(panel->swi[6], True);
|
||||
+ WMSetButtonText(panel->swi[7], _("Double click on title bar maximize"));
|
||||
+ WMSetButtonText(panel->swi[8], _("Launch applications and restore windows with a single click"));
|
||||
+
|
||||
|
||||
WMRealizeWidget(panel->box);
|
||||
WMMapSubwidgets(panel->box);
|
||||
@@ -103,6 +107,8 @@
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText");
|
||||
+ SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "DCMaximize");
|
||||
+ SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "SingleClickLaunch");
|
||||
}
|
||||
|
||||
|
||||
--- WindowMaker-0.91.0/src/WindowMaker.h 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/src/WindowMaker.h 2005-05-21 16:10:41.000000000 -0700
|
||||
@@ -466,6 +466,12 @@
|
||||
/* shading animation */
|
||||
signed char shade_speed;
|
||||
|
||||
+ /* double click on title bar maximize */
|
||||
+ char dc_maximize;
|
||||
+
|
||||
+ /* single click to lauch applications */
|
||||
+ char single_click;
|
||||
+
|
||||
int edge_resistance;
|
||||
char attract;
|
||||
|
||||
--- WindowMaker-0.91.0/src/appicon.c 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/src/appicon.c 2005-05-21 16:10:41.000000000 -0700
|
||||
@@ -585,6 +585,7 @@
|
||||
int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
|
||||
int ix, iy;
|
||||
int clickButton = event->xbutton.button;
|
||||
+ Bool hasMoved = False;
|
||||
Pixmap ghost = None;
|
||||
Window wins[2];
|
||||
Bool movingSingle = False;
|
||||
@@ -665,6 +666,7 @@
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
+ hasMoved = True;
|
||||
if (!grabbed) {
|
||||
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
|
||||
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
|
||||
@@ -802,6 +804,9 @@
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(scr, True);
|
||||
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ iconDblClick(desc, event);
|
||||
+
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
--- WindowMaker-0.91.0/src/defaults.c 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/src/defaults.c 2005-05-21 16:10:41.000000000 -0700
|
||||
@@ -556,6 +556,12 @@
|
||||
{"DisableBlinking", "NO", NULL,
|
||||
&wPreferences.dont_blink, getBool, NULL
|
||||
},
|
||||
+ {"DCMaximize", "NO", NULL,
|
||||
+ &wPreferences.dc_maximize, getBool, NULL
|
||||
+ },
|
||||
+ {"SingleClickLaunch", "NO", NULL,
|
||||
+ &wPreferences.single_click, getBool, NULL
|
||||
+ },
|
||||
/* style options */
|
||||
{"MenuStyle", "normal", seMenuStyles,
|
||||
&wPreferences.menu_style, getEnum, setMenuStyle
|
||||
--- WindowMaker-0.91.0/src/dock.c 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/src/dock.c 2005-05-21 16:12:58.000000000 -0700
|
||||
@@ -3758,7 +3758,7 @@
|
||||
|
||||
|
||||
|
||||
-static void
|
||||
+static Bool
|
||||
handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||
{
|
||||
WScreen *scr = dock->screen_ptr;
|
||||
@@ -3774,6 +3774,7 @@
|
||||
int tmp;
|
||||
Pixmap ghost = None;
|
||||
Bool docked;
|
||||
+ Bool hasMoved = False;
|
||||
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
|
||||
int omnipresent = aicon->omnipresent; /* this must be cached!!! */
|
||||
|
||||
@@ -3828,6 +3829,7 @@
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
+ hasMoved = True;
|
||||
if (!grabbed) {
|
||||
if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
|
||||
|| abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
|
||||
@@ -3977,7 +3979,7 @@
|
||||
#ifdef DEBUG
|
||||
puts("End icon move");
|
||||
#endif
|
||||
- return;
|
||||
+ return hasMoved;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4114,10 +4116,13 @@
|
||||
if (getClipButton(event->xbutton.x, event->xbutton.y)!=CLIP_IDLE
|
||||
&& dock->type==WM_CLIP)
|
||||
handleClipChangeWorkspace(scr, event);
|
||||
- else
|
||||
- handleDockMove(dock, aicon, event);
|
||||
- } else
|
||||
- handleIconMove(dock, aicon, event);
|
||||
+ else
|
||||
+ handleDockMove(dock, aicon, event);
|
||||
+ } else {
|
||||
+ Bool hasMoved = handleIconMove(dock, aicon, event);
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ iconDblClick(desc, event);
|
||||
+ }
|
||||
|
||||
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
|
||||
aicon==scr->clip_icon) {
|
||||
--- WindowMaker-0.91.0/src/icon.c 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/src/icon.c 2005-05-21 16:10:41.000000000 -0700
|
||||
@@ -891,6 +891,7 @@
|
||||
int dx=event->xbutton.x, dy=event->xbutton.y;
|
||||
int grabbed=0;
|
||||
int clickButton=event->xbutton.button;
|
||||
+ Bool hasMoved = False;
|
||||
|
||||
if (WCHECK_STATE(WSTATE_MODAL))
|
||||
return;
|
||||
@@ -942,6 +943,7 @@
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
+ hasMoved = True;
|
||||
if (!grabbed) {
|
||||
if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
|
||||
|| abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
|
||||
@@ -979,6 +981,9 @@
|
||||
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(wwin->screen_ptr, True);
|
||||
+ if (!hasMoved && wPreferences.single_click)
|
||||
+ miniwindowDblClick(desc, event);
|
||||
+
|
||||
return;
|
||||
|
||||
}
|
||||
--- WindowMaker-0.91.0/src/window.c 2005-05-21 17:04:42.000000000 -0700
|
||||
+++ /tmp/WindowMaker-0.91.0/src/window.c 2005-05-21 16:10:41.000000000 -0700
|
||||
@@ -3089,13 +3089,29 @@
|
||||
|
||||
if (event->xbutton.button==Button1) {
|
||||
if (event->xbutton.state == 0) {
|
||||
- if (!WFLAGP(wwin, no_shadeable)) {
|
||||
+ /* check preferences, maximize or shade */
|
||||
+ if (wPreferences.dc_maximize) {
|
||||
+ if (!WFLAGP(wwin, no_resizable)) {
|
||||
+ /* maximize window */
|
||||
+ if (wwin->flags.maximized != 0) {
|
||||
+ wUnmaximizeWindow(wwin);
|
||||
+ wwin->flags.maximized = 0;
|
||||
+ }
|
||||
+ else {
|
||||
+ wMaximizeWindow(wwin, MAX_VERTICAL|MAX_HORIZONTAL);
|
||||
+ wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ if (!WFLAGP(wwin, no_shadeable)) {
|
||||
/* shade window */
|
||||
if (wwin->flags.shaded)
|
||||
- wUnshadeWindow(wwin);
|
||||
+ wUnshadeWindow(wwin);
|
||||
else
|
||||
- wShadeWindow(wwin);
|
||||
- }
|
||||
+ wShadeWindow(wwin);
|
||||
+ }
|
||||
+ }
|
||||
} else {
|
||||
int dir = 0;
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
diff -ur WindowMaker-0.91.0/WINGs/wlist.c WindowMaker-0.91.0-test/WINGs/wlist.c
|
||||
--- WindowMaker-0.91.0/WINGs/wlist.c 2004-10-12 14:36:42.000000000 -0400
|
||||
+++ WindowMaker-0.91.0-test/WINGs/wlist.c 2005-03-13 13:37:39.914633856 -0500
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
+#include <X11/keysym.h>
|
||||
+
|
||||
char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
||||
char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
||||
|
||||
@@ -44,6 +46,7 @@
|
||||
unsigned int redrawPending:1;
|
||||
unsigned int buttonPressed:1;
|
||||
unsigned int buttonWasPressed:1;
|
||||
+ unsigned int focused:1;
|
||||
} flags;
|
||||
} List;
|
||||
|
||||
@@ -141,10 +144,10 @@
|
||||
lPtr->view->delegate = &_ListViewDelegate;
|
||||
|
||||
WMCreateEventHandler(lPtr->view, ExposureMask|StructureNotifyMask
|
||||
- |ClientMessageMask, handleEvents, lPtr);
|
||||
+ |FocusChangeMask|ClientMessageMask, handleEvents, lPtr);
|
||||
|
||||
WMCreateEventHandler(lPtr->view, ButtonPressMask|ButtonReleaseMask
|
||||
- |EnterWindowMask|LeaveWindowMask|ButtonMotionMask,
|
||||
+ |EnterWindowMask|LeaveWindowMask|ButtonMotionMask|KeyPressMask,
|
||||
handleActionEvents, lPtr);
|
||||
|
||||
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
||||
@@ -1044,6 +1047,11 @@
|
||||
int topItem = lPtr->topItem;
|
||||
static int lastClicked = -1, prevItem = -1;
|
||||
|
||||
+ /* for arrow keys handling */
|
||||
+ char buffer[64];
|
||||
+ KeySym ksym;
|
||||
+ int count, row;
|
||||
+
|
||||
CHECK_CLASS(data, WC_List);
|
||||
|
||||
switch (event->type) {
|
||||
@@ -1096,6 +1104,10 @@
|
||||
case ButtonPress:
|
||||
if (event->xbutton.x <= WMWidgetWidth(lPtr->vScroller))
|
||||
break;
|
||||
+ /* need focus for keyboard events */
|
||||
+ if (!lPtr->flags.focused);
|
||||
+ WMSetFocusToWidget(lPtr);
|
||||
+
|
||||
if (event->xbutton.button == WINGsConfiguration.mouseWheelDown ||
|
||||
event->xbutton.button == WINGsConfiguration.mouseWheelUp) {
|
||||
int amount = 0;
|
||||
@@ -1202,6 +1214,34 @@
|
||||
prevItem = tmp;
|
||||
}
|
||||
break;
|
||||
+ case KeyPress:
|
||||
+ /* handle arrow keys, space and return */
|
||||
+ count = XLookupString(&event->xkey, buffer, 63, &ksym, NULL);
|
||||
+ buffer[count] = '\0';
|
||||
+ switch(ksym) {
|
||||
+ case XK_Up:
|
||||
+ row = WMGetListSelectedItemRow(lPtr);
|
||||
+ WMSelectListItem(lPtr, row - 1);
|
||||
+ if (row <= topItem)
|
||||
+ scrollByAmount(lPtr, -1);
|
||||
+ break;
|
||||
+ case XK_Down:
|
||||
+ row = WMGetListSelectedItemRow(lPtr);
|
||||
+ WMSelectListItem(lPtr, row + 1);
|
||||
+ if (row - topItem >= lPtr->fullFitLines)
|
||||
+ scrollByAmount(lPtr, 1);
|
||||
+ break;
|
||||
+ case XK_space:
|
||||
+ if (lPtr->action)
|
||||
+ (*lPtr->action)(lPtr, lPtr->clientData);
|
||||
+ break;
|
||||
+ case XK_Return:
|
||||
+ if (lPtr->doubleAction)
|
||||
+ (*lPtr->doubleAction)(lPtr, lPtr->clientData);
|
||||
+ break;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
}
|
||||
if (lPtr->topItem != topItem)
|
||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||
Only in WindowMaker-0.91.0-test/WINGs: wlist.c.orig
|
||||
@@ -1,23 +0,0 @@
|
||||
--- configure.ac.orig 2007-08-27 00:51:31.000000000 +0200
|
||||
+++ configure.ac 2007-08-27 00:52:14.000000000 +0200
|
||||
@@ -197,7 +197,7 @@
|
||||
|
||||
AC_CACHE_CHECK(whether gcc supports x86 inline asm,
|
||||
ac_cv_c_inline_asm,
|
||||
- [AC_TRY_LINK(,[{int x; asm volatile("movl %%eax, %%ebx\n"::
|
||||
+ [AC_TRY_LINK(,[{int x; asm volatile("movl %%eax, %%ebx\n\t pushal\n\t popal"::
|
||||
"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),
|
||||
"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),"m" (x));}],
|
||||
ac_cv_c_inline_asm=yes,
|
||||
@@ -840,11 +840,6 @@
|
||||
else
|
||||
gnustepdir=$appspath
|
||||
|
||||
- if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
|
||||
- gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
|
||||
- gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
|
||||
- fi
|
||||
-
|
||||
wprefs_base_dir=$gnustepdir/Applications
|
||||
wprefs_datadir=$wprefs_base_dir/WPrefs.app
|
||||
wprefs_bindir=$wprefs_base_dir/WPrefs.app
|
||||
@@ -1,15 +0,0 @@
|
||||
Index: src/event.c
|
||||
===================================================================
|
||||
--- src/event.c (revision 41)
|
||||
+++ src/event.c (working copy)
|
||||
@@ -559,6 +559,10 @@
|
||||
wwin->flags.skip_next_animation = 1;
|
||||
wIconifyWindow(wwin);
|
||||
}
|
||||
+ if (wwin->flags.fullscreen) {
|
||||
+ wwin->flags.fullscreen = 0;
|
||||
+ wFullscreenWindow(wwin);
|
||||
+ }
|
||||
if (wwin->flags.hidden) {
|
||||
WApplication *wapp = wApplicationOf(wwin->main_window);
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
--- NEW FILE windowmaker-gcc4-x86_64.patch ---
|
||||
--- WindowMaker-0.92.0/wrlib/x86_specific.c 2004-10-31 02:44:01.000000000 +0100
|
||||
+++ WindowMaker-0.92.0/wrlib/x86_specific.c 2005-08-22 21:07:57.000000000 +0200
|
||||
@@ -98,15 +98,23 @@
|
||||
int height,
|
||||
int line_offset)
|
||||
{
|
||||
- long long rrggbbaa;
|
||||
- long long pixel;
|
||||
+ union {
|
||||
+ long long rrggbbaa;
|
||||
+ struct {short int rr, gg, bb, aa;} words;
|
||||
+ } rrggbbaa;
|
||||
+
|
||||
+ union {
|
||||
+ long long pixel;
|
||||
+ struct {short int rr, gg, bb, aa;} words;
|
||||
+ } pixel;
|
||||
+
|
||||
short *tmp_err;
|
||||
short *tmp_nerr;
|
||||
int x;
|
||||
|
||||
asm volatile
|
||||
(
|
||||
- "pushal \n\t"
|
||||
+ "pushl %%ebx \n\t"
|
||||
|
||||
// pack dr, dg and db into mm6
|
||||
"movl %7, %%eax \n\t"
|
||||
@@ -290,7 +298,7 @@
|
||||
|
||||
".Enda: \n\t" // THE END
|
||||
"emms \n\t"
|
||||
- "popal \n\t"
|
||||
+ "popl %%ebx \n\t"
|
||||
:
|
||||
:
|
||||
"m" (image), // %0
|
||||
@@ -309,17 +317,18 @@
|
||||
"m" (width), // %13
|
||||
"m" (height), // %14
|
||||
"m" (line_offset), // %15
|
||||
- "m" (rrggbbaa), // %16 (access to rr)
|
||||
- "m" ((*((short*)(&rrggbbaa)+1))), // %17 (access to gg)
|
||||
- "m" ((*((short*)(&rrggbbaa)+2))), // %18 (access to bb)
|
||||
- "m" ((*((short*)(&rrggbbaa)+3))), // %19 (access to aa)
|
||||
- "m" (pixel), // %20 (access to pixel.r)
|
||||
- "m" ((*((short*)(&pixel)+1))), // %21 (access to pixel.g)
|
||||
- "m" ((*((short*)(&pixel)+2))), // %22 (access to pixel.b)
|
||||
- "m" ((*((short*)(&pixel)+3))), // %23 (access to pixel.a)
|
||||
+ "m" (rrggbbaa.rrggbbaa), // %16 (access to rr)
|
||||
+ "m" (rrggbbaa.words.gg), // %17 (access to gg)
|
||||
+ "m" (rrggbbaa.words.bb), // %18 (access to bb)
|
||||
+ "m" (rrggbbaa.words.aa), // %19 (access to aa)
|
||||
+ "m" (pixel.pixel), // %20 (access to pixel.r)
|
||||
+ "m" (pixel.words.gg), // %21 (access to pixel.g)
|
||||
+ "m" (pixel.words.bb), // %22 (access to pixel.b)
|
||||
+ "m" (pixel.words.aa), // %23 (access to pixel.a)
|
||||
"m" (tmp_err), // %24
|
||||
"m" (tmp_nerr), // %25
|
||||
"m" (x) // %26
|
||||
+ : "eax", "ecx", "edx", "esi", "edi"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -342,8 +351,15 @@
|
||||
int height,
|
||||
int line_offset)
|
||||
{
|
||||
- long long rrggbbaa;
|
||||
- long long pixel;
|
||||
+ union {
|
||||
+ long long rrggbbaa;
|
||||
+ struct {short int rr, gg, bb, aa;} words;
|
||||
+ } rrggbbaa;
|
||||
+
|
||||
+ union {
|
||||
+ long long pixel;
|
||||
+ struct {short int rr, gg, bb, aa;} words;
|
||||
+ } pixel;
|
||||
|
||||
short *tmp_err;
|
||||
short *tmp_nerr;
|
||||
@@ -354,7 +370,7 @@
|
||||
|
||||
asm volatile
|
||||
(
|
||||
- "pushal \n\t"
|
||||
+ "pushl %%ebx \n\t"
|
||||
|
||||
"movl %13, %%eax \n\t" // eax = width
|
||||
"movl %%eax, %%ebx \n\t"
|
||||
@@ -424,7 +440,7 @@
|
||||
|
||||
".Endc: \n\t" // THE END
|
||||
"emms \n\t"
|
||||
- "popal \n\t"
|
||||
+ "popl %%ebx \n\t"
|
||||
:
|
||||
:
|
||||
"m" (image), // %0
|
||||
@@ -443,19 +459,20 @@
|
||||
"m" (width), // %13
|
||||
"m" (height), // %14
|
||||
"m" (line_offset), // %15
|
||||
- "m" (rrggbbaa), // %16 (access to rr)
|
||||
- "m" ((*((short*)(&rrggbbaa)+1))), // %17 (access to gg)
|
||||
- "m" ((*((short*)(&rrggbbaa)+2))), // %18 (access to bb)
|
||||
- "m" ((*((short*)(&rrggbbaa)+3))), // %19 (access to aa)
|
||||
- "m" (pixel), // %20 (access to pixel.r)
|
||||
- "m" ((*((short*)(&pixel)+1))), // %21 (access to pixel.g)
|
||||
- "m" ((*((short*)(&pixel)+2))), // %22 (access to pixel.b)
|
||||
- "m" ((*((short*)(&pixel)+3))), // %23 (access to pixel.a)
|
||||
+ "m" (rrggbbaa.rrggbbaa), // %16 (access to rr)
|
||||
+ "m" (rrggbbaa.words.gg), // %17 (access to gg)
|
||||
+ "m" (rrggbbaa.words.bb), // %18 (access to bb)
|
||||
+ "m" (rrggbbaa.words.aa), // %19 (access to aa)
|
||||
+ "m" (pixel.pixel), // %20 (access to pixel.r)
|
||||
+ "m" (pixel.words.gg), // %21 (access to pixel.g)
|
||||
+ "m" (pixel.words.bb), // %22 (access to pixel.b)
|
||||
+ "m" (pixel.words.aa), // %23 (access to pixel.a)
|
||||
"m" (tmp_err), // %24
|
||||
"m" (tmp_nerr), // %25
|
||||
"m" (x), // %26
|
||||
"m" (w1), // %27
|
||||
"m" (w2) // %28
|
||||
+ : "eax", "ecx", "edx", "esi", "edi"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -705,17 +705,17 @@
|
||||
|
||||
if test "$gif" = yes; then
|
||||
my_libname=""
|
||||
- WM_CHECK_LIB(ungif, DGifOpenFileName, [$XLFLAGS $XLIBS])
|
||||
- if test "x$ac_cv_lib_ungif_DGifOpenFileName" = xyes; then
|
||||
- my_libname=-lungif
|
||||
+ WM_CHECK_LIB(gif, DGifOpenFileName, [$XLFLAGS $XLIBS])
|
||||
+ if test "x$ac_cv_lib_gif_DGifOpenFileName" = xyes; then
|
||||
+ my_libname=-lgif
|
||||
fi
|
||||
dnl
|
||||
dnl libungif is the same thing as libgif for all practical purposes.
|
||||
dnl
|
||||
if test "x$my_libname" = x; then
|
||||
- WM_CHECK_LIB(gif, DGifOpenFileName, [$XLFLAGS $XLIBS])
|
||||
- if test "x$ac_cv_lib_gif_DGifOpenFileName" = xyes; then
|
||||
- my_libname=-lgif
|
||||
+ WM_CHECK_LIB(ungif, DGifOpenFileName, [$XLFLAGS $XLIBS])
|
||||
+ if test "x$ac_cv_lib_ungif_DGifOpenFileName" = xyes; then
|
||||
+ my_libname=-lungif
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
Add a missing #include <math.h>.
|
||||
|
||||
--- WindowMaker-0.92.0/configure.ac
|
||||
+++ WindowMaker-0.92.0/configure.ac
|
||||
@@ -78,7 +78,8 @@
|
||||
[ --with-incs-from pass compiler flags to look for header files],
|
||||
[inc_search_path="$withval $inc_search_path"])
|
||||
|
||||
-
|
||||
+AC_CHECK_LIBM
|
||||
+AC_SUBST([LIBM])
|
||||
|
||||
dnl Checks for library functions.
|
||||
dnl ============================
|
||||
--- WindowMaker-0.92.0/src/placement.c
|
||||
+++ WindowMaker-0.92.0/src/placement.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
+#include <math.h>
|
||||
|
||||
#include "WindowMaker.h"
|
||||
#include "wcore.h"
|
||||
@@ -1,84 +0,0 @@
|
||||
--- src/wmspec.c.sav 2004-10-24 21:36:15.000000000 +0200
|
||||
+++ src/wmspec.c 2005-01-26 17:13:54.266216856 +0100
|
||||
@@ -314,15 +314,15 @@
|
||||
void
|
||||
wNETWMUpdateDesktop(WScreen *scr)
|
||||
{
|
||||
- CARD32 *views, sizes[2];
|
||||
+ long *views, sizes[2];
|
||||
int count, i;
|
||||
|
||||
if (scr->workspace_count==0)
|
||||
return;
|
||||
|
||||
count = scr->workspace_count * 2;
|
||||
- views = wmalloc(sizeof(CARD32) * count);
|
||||
- /*memset(views, 0, sizeof(CARD32) * count);*/
|
||||
+ views = wmalloc(sizeof(long) * count);
|
||||
+ /*memset(views, 0, sizeof(long) * count);*/
|
||||
|
||||
#ifdef VIRTUAL_DESKTOP
|
||||
sizes[0] = scr->workspaces[scr->current_workspace]->width;
|
||||
@@ -362,7 +362,7 @@
|
||||
0, 1, &count);
|
||||
if (prop)
|
||||
{
|
||||
- int desktop= *(CARD32*)prop;
|
||||
+ int desktop= *(long*)prop;
|
||||
XFree(prop);
|
||||
return desktop;
|
||||
}
|
||||
@@ -426,7 +426,7 @@
|
||||
static void
|
||||
updateShowDesktop(WScreen * scr, Bool show)
|
||||
{
|
||||
- CARD32 foo;
|
||||
+ long foo;
|
||||
|
||||
foo = (show == True);
|
||||
XChangeProperty(dpy, scr->root_win, net_showing_desktop, XA_CARDINAL, 32,
|
||||
@@ -599,7 +599,7 @@
|
||||
void
|
||||
wNETWMUpdateWorkarea(WScreen *scr, WArea usableArea)
|
||||
{
|
||||
- CARD32 *area;
|
||||
+ long *area;
|
||||
int count, i;
|
||||
|
||||
/* XXX: not Xinerama compatible,
|
||||
@@ -609,7 +609,7 @@
|
||||
return;
|
||||
|
||||
count = scr->workspace_count * 4;
|
||||
- area = wmalloc(sizeof(CARD32) * count);
|
||||
+ area = wmalloc(sizeof(long) * count);
|
||||
for (i=0; i<scr->workspace_count; i++) {
|
||||
area[4*i + 0] = usableArea.x1;
|
||||
area[4*i + 1] = usableArea.y1;
|
||||
@@ -732,7 +732,7 @@
|
||||
static void
|
||||
updateWorkspaceCount(WScreen *scr) /* changeable */
|
||||
{
|
||||
- CARD32 count;
|
||||
+ long count;
|
||||
|
||||
count = scr->workspace_count;
|
||||
|
||||
@@ -744,7 +744,7 @@
|
||||
static void
|
||||
updateCurrentWorkspace(WScreen *scr) /* changeable */
|
||||
{
|
||||
- CARD32 count;
|
||||
+ long count;
|
||||
|
||||
count = scr->current_workspace;
|
||||
|
||||
@@ -791,7 +791,7 @@
|
||||
static void
|
||||
updateWorkspaceHint(WWindow *wwin, Bool fake, Bool del)
|
||||
{
|
||||
- CARD32 l;
|
||||
+ long l;
|
||||
|
||||
if (del) {
|
||||
XDeleteProperty(dpy, wwin->client_win, net_wm_desktop);
|
||||
@@ -0,0 +1,204 @@
|
||||
diff --git a/src/actions.c b/src/actions.c
|
||||
index 5adfab4..5ac98c6 100644
|
||||
--- a/src/actions.c
|
||||
+++ b/src/actions.c
|
||||
@@ -354,7 +354,7 @@ void update_saved_geometry(WWindow *wwin)
|
||||
save_old_geometry(wwin, SAVE_GEOMETRY_X);
|
||||
}
|
||||
|
||||
-void wMaximizeWindow(WWindow *wwin, int directions)
|
||||
+void wMaximizeWindow(WWindow *wwin, int directions, int head)
|
||||
{
|
||||
unsigned int new_width, new_height, half_scr_width, half_scr_height;
|
||||
int new_x = 0;
|
||||
@@ -388,20 +388,7 @@ void wMaximizeWindow(WWindow *wwin, int directions)
|
||||
totalArea.y2 = scr->scr_height;
|
||||
totalArea.x1 = 0;
|
||||
totalArea.y1 = 0;
|
||||
- usableArea = totalArea;
|
||||
-
|
||||
- if (!(directions & MAX_IGNORE_XINERAMA)) {
|
||||
- WScreen *scr = wwin->screen_ptr;
|
||||
- int head;
|
||||
-
|
||||
- if (directions & MAX_KEYBOARD)
|
||||
- head = wGetHeadForWindow(wwin);
|
||||
- else
|
||||
- head = wGetHeadForPointerLocation(scr);
|
||||
-
|
||||
- usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);
|
||||
- }
|
||||
-
|
||||
+ usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);
|
||||
|
||||
/* Only save directions, not kbd or xinerama hints */
|
||||
directions &= (MAX_HORIZONTAL | MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_TOPHALF | MAX_BOTTOMHALF | MAX_MAXIMUS);
|
||||
@@ -497,20 +484,51 @@ void handleMaximize(WWindow *wwin, int directions)
|
||||
int requested = directions & (MAX_HORIZONTAL | MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_TOPHALF | MAX_BOTTOMHALF | MAX_MAXIMUS);
|
||||
int effective = requested ^ current;
|
||||
int flags = directions & ~requested;
|
||||
+ int head = wGetHeadForWindow(wwin);
|
||||
+ WMPoint p;
|
||||
|
||||
if (!effective) {
|
||||
/* allow wMaximizeWindow to restore the Maximusized size */
|
||||
if ((wwin->flags.old_maximized & MAX_MAXIMUS) &&
|
||||
!(requested & MAX_MAXIMUS))
|
||||
- wMaximizeWindow(wwin, MAX_MAXIMUS | flags);
|
||||
- else
|
||||
- wUnmaximizeWindow(wwin);
|
||||
+ wMaximizeWindow(wwin, MAX_MAXIMUS | flags, head);
|
||||
+ else {
|
||||
+ if (requested & MAX_LEFTHALF && current & MAX_LEFTHALF) {
|
||||
+ p.x = wwin->frame_x - 100;
|
||||
+ p.y = 0;
|
||||
+
|
||||
+ if (p.x > 0) {
|
||||
+ head = wGetHeadForPoint(wwin->screen_ptr, p);
|
||||
+ if (head != wGetHeadForWindow(wwin)) {
|
||||
+ effective |= MAX_RIGHTHALF;
|
||||
+ effective |= MAX_VERTICAL;
|
||||
+ effective &= ~(MAX_HORIZONTAL | MAX_LEFTHALF);
|
||||
+ wMaximizeWindow(wwin, effective | flags, head);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else if (requested & MAX_RIGHTHALF && current & MAX_RIGHTHALF) {
|
||||
+ p.x = wwin->frame_x + wwin->frame->core->width + 100;
|
||||
+ p.y = 0;
|
||||
+ head = wGetHeadForPoint(wwin->screen_ptr, p);
|
||||
+ if (head != wGetHeadForWindow(wwin)) {
|
||||
+ effective |= MAX_LEFTHALF;
|
||||
+ effective |= MAX_VERTICAL;
|
||||
+ effective &= ~(MAX_HORIZONTAL | MAX_RIGHTHALF);
|
||||
+ wMaximizeWindow(wwin, effective | flags, head);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
/* these alone mean vertical|horizontal toggle */
|
||||
} else if ((effective == MAX_LEFTHALF) ||
|
||||
(effective == MAX_RIGHTHALF) ||
|
||||
(effective == MAX_TOPHALF) ||
|
||||
(effective == MAX_BOTTOMHALF))
|
||||
wUnmaximizeWindow(wwin);
|
||||
+ else if (requested & MAX_LEFTHALF && current & MAX_RIGHTHALF)
|
||||
+ wMaximizeWindow(wwin, (MAX_HORIZONTAL|MAX_VERTICAL), head);
|
||||
+ else if (requested & MAX_RIGHTHALF && current & MAX_LEFTHALF)
|
||||
+ wMaximizeWindow(wwin, (MAX_HORIZONTAL|MAX_VERTICAL), head);
|
||||
else {
|
||||
if ((requested == (MAX_HORIZONTAL | MAX_VERTICAL)) ||
|
||||
(requested == MAX_MAXIMUS))
|
||||
@@ -552,7 +570,7 @@ void handleMaximize(WWindow *wwin, int directions)
|
||||
effective &= ~(MAX_TOPHALF | MAX_BOTTOMHALF);
|
||||
effective &= ~MAX_MAXIMUS;
|
||||
}
|
||||
- wMaximizeWindow(wwin, effective | flags);
|
||||
+ wMaximizeWindow(wwin, effective | flags, head);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/actions.h b/src/actions.h
|
||||
index 8390e49..a15cf48 100644
|
||||
--- a/src/actions.h
|
||||
+++ b/src/actions.h
|
||||
@@ -57,7 +57,7 @@ void wSelectWindows(WScreen *scr, XEvent *ev);
|
||||
void wSelectWindow(WWindow *wwin, Bool flag);
|
||||
void wUnselectWindows(WScreen *scr);
|
||||
|
||||
-void wMaximizeWindow(WWindow *wwin, int directions);
|
||||
+void wMaximizeWindow(WWindow *wwin, int directions, int head);
|
||||
void wUnmaximizeWindow(WWindow *wwin);
|
||||
void handleMaximize(WWindow *wwin, int directions);
|
||||
|
||||
diff --git a/src/event.c b/src/event.c
|
||||
index e7ee074..54c191f 100644
|
||||
--- a/src/event.c
|
||||
+++ b/src/event.c
|
||||
@@ -632,7 +632,8 @@ static void handleMapRequest(XEvent * ev)
|
||||
if (wwin) {
|
||||
wClientSetState(wwin, NormalState, None);
|
||||
if (wwin->flags.maximized) {
|
||||
- wMaximizeWindow(wwin, wwin->flags.maximized);
|
||||
+ wMaximizeWindow(wwin, wwin->flags.maximized,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
}
|
||||
if (wwin->flags.shaded) {
|
||||
wwin->flags.shaded = 0;
|
||||
diff --git a/src/window.c b/src/window.c
|
||||
index 532670c..8945a54 100644
|
||||
--- a/src/window.c
|
||||
+++ b/src/window.c
|
||||
@@ -2855,7 +2855,7 @@ static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
|
||||
int ndir = dir ^ wwin->flags.maximized;
|
||||
|
||||
if (ndir != 0)
|
||||
- wMaximizeWindow(wwin, ndir);
|
||||
+ wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin));
|
||||
else
|
||||
wUnmaximizeWindow(wwin);
|
||||
}
|
||||
diff --git a/src/winmenu.c b/src/winmenu.c
|
||||
index c7da09d..fc63fc6 100644
|
||||
--- a/src/winmenu.c
|
||||
+++ b/src/winmenu.c
|
||||
@@ -169,7 +169,7 @@ static void execWindowOptionCommand(WMenu * menu, WMenuEntry * entry)
|
||||
static void execMaximizeCommand(WMenu * menu, WMenuEntry * entry)
|
||||
{
|
||||
WWindow *wwin = (WWindow *) entry->clientdata;
|
||||
-
|
||||
+
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) menu;
|
||||
|
||||
@@ -277,7 +277,8 @@ static void execMenuCommand(WMenu * menu, WMenuEntry * entry)
|
||||
if (wwin->flags.maximized)
|
||||
wUnmaximizeWindow(wwin);
|
||||
else
|
||||
- wMaximizeWindow(wwin, MAX_VERTICAL | MAX_HORIZONTAL);
|
||||
+ wMaximizeWindow(wwin, MAX_VERTICAL | MAX_HORIZONTAL,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
break;
|
||||
|
||||
case MC_SHADE:
|
||||
diff --git a/src/wmspec.c b/src/wmspec.c
|
||||
index 9b56f96..96ba984 100644
|
||||
--- a/src/wmspec.c
|
||||
+++ b/src/wmspec.c
|
||||
@@ -1120,9 +1120,11 @@ static void doStateAtom(WWindow *wwin, Atom state, int set, Bool init)
|
||||
wwin->flags.maximized |= (set ? MAX_VERTICAL : 0);
|
||||
} else {
|
||||
if (set)
|
||||
- wMaximizeWindow(wwin, wwin->flags.maximized | MAX_VERTICAL);
|
||||
+ wMaximizeWindow(wwin, wwin->flags.maximized | MAX_VERTICAL,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
else
|
||||
- wMaximizeWindow(wwin, wwin->flags.maximized & ~MAX_VERTICAL);
|
||||
+ wMaximizeWindow(wwin, wwin->flags.maximized & ~MAX_VERTICAL,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
}
|
||||
} else if (state == net_wm_state_maximized_horz) {
|
||||
if (set == _NET_WM_STATE_TOGGLE)
|
||||
@@ -1132,9 +1134,11 @@ static void doStateAtom(WWindow *wwin, Atom state, int set, Bool init)
|
||||
wwin->flags.maximized |= (set ? MAX_HORIZONTAL : 0);
|
||||
} else {
|
||||
if (set)
|
||||
- wMaximizeWindow(wwin, wwin->flags.maximized | MAX_HORIZONTAL);
|
||||
+ wMaximizeWindow(wwin, wwin->flags.maximized | MAX_HORIZONTAL,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
else
|
||||
- wMaximizeWindow(wwin, wwin->flags.maximized & ~MAX_HORIZONTAL);
|
||||
+ wMaximizeWindow(wwin, wwin->flags.maximized & ~MAX_HORIZONTAL,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
}
|
||||
} else if (state == net_wm_state_hidden) {
|
||||
if (set == _NET_WM_STATE_TOGGLE)
|
||||
@@ -1623,7 +1627,8 @@ Bool wNETWMProcessClientMessage(XClientMessageEvent *event)
|
||||
wwin->flags.maximized = maximized;
|
||||
wUnmaximizeWindow(wwin);
|
||||
} else {
|
||||
- wMaximizeWindow(wwin, wwin->flags.maximized);
|
||||
+ wMaximizeWindow(wwin, wwin->flags.maximized,
|
||||
+ wGetHeadForWindow(wwin));
|
||||
}
|
||||
}
|
||||
updateStateHint(wwin, False, False);
|
||||
@@ -1,5 +1,4 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
# The names/descriptions should really be better
|
||||
Name=GNUStep WindowMaker
|
||||
Comment=Use this session to run WindowMaker as your desktop environment
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
diff -ur WindowMaker-0.92.0_orig/src/window.c WindowMaker-0.92.0/src/window.c
|
||||
--- WindowMaker-0.92.0_orig/src/window.c 2005-07-01 02:56:11.000000000 +0200
|
||||
+++ WindowMaker-0.92.0/src/window.c 2010-07-17 12:07:44.000000000 +0200
|
||||
@@ -1301,7 +1301,9 @@
|
||||
if (WFLAGP(wwin, no_miniaturize_button))
|
||||
foo |= WFF_LEFT_BUTTON;
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
- if (WFLAGP(wwin, no_language_button) || WFLAGP(wwin, no_focusable))
|
||||
+ if (wPreferences.modelock
|
||||
+ && (WFLAGP(wwin, no_language_button)
|
||||
+ || WFLAGP(wwin, no_focusable)))
|
||||
foo |= WFF_LANGUAGE_BUTTON;
|
||||
#endif
|
||||
if (foo!=0)
|
||||
@@ -1613,7 +1615,8 @@
|
||||
foo = WFF_RIGHT_BUTTON|WFF_BORDER;
|
||||
foo |= WFF_TITLEBAR;
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
- foo |= WFF_LANGUAGE_BUTTON;
|
||||
+ if (wPreferences.modelock)
|
||||
+ foo |= WFF_LANGUAGE_BUTTON;
|
||||
#endif
|
||||
|
||||
wwin->frame = wFrameWindowCreate(scr, WMFloatingLevel,
|
||||
@@ -2435,7 +2438,8 @@
|
||||
}
|
||||
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
- if (!WFLAGP(wwin, no_language_button)) {
|
||||
+ if (wPreferences.modelock
|
||||
+ && !WFLAGP(wwin, no_language_button)) {
|
||||
if (fwin->languagebutton_image &&
|
||||
!fwin->languagebutton_image->shared) {
|
||||
wPixmapDestroy(fwin->languagebutton_image);
|
||||
@@ -2518,7 +2522,8 @@
|
||||
flags = WFF_LEFT_BUTTON|WFF_RIGHT_BUTTON;
|
||||
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
- flags |= WFF_LANGUAGE_BUTTON;
|
||||
+ if (wPreferences.modelock)
|
||||
+ flags |= WFF_LANGUAGE_BUTTON;
|
||||
#endif
|
||||
|
||||
if (HAS_TITLEBAR(wwin))
|
||||
@@ -2546,10 +2551,10 @@
|
||||
flags |= WFF_LEFT_BUTTON;
|
||||
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
- if (!WFLAGP(wwin, no_language_button)
|
||||
- && wwin->frame->flags.hide_language_button) {
|
||||
+ if (wPreferences.modelock
|
||||
+ && !WFLAGP(wwin, no_language_button)
|
||||
+ && wwin->frame->flags.hide_language_button)
|
||||
flags |= WFF_LANGUAGE_BUTTON;
|
||||
- }
|
||||
#endif
|
||||
|
||||
if (!WFLAGP(wwin, no_close_button)
|
||||
@@ -2567,7 +2572,8 @@
|
||||
flags |= WFF_LEFT_BUTTON;
|
||||
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
- if (WFLAGP(wwin, no_language_button)
|
||||
+ if (wPreferences.modelock
|
||||
+ && WFLAGP(wwin, no_language_button)
|
||||
&& !wwin->frame->flags.hide_language_button)
|
||||
flags |= WFF_LANGUAGE_BUTTON;
|
||||
#endif
|
||||
Reference in New Issue
Block a user