mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
fixed restart crash bug
updated kwm hint made kwm&gnome hints mutually exclusive (for read)
This commit is contained in:
@@ -106,7 +106,7 @@ wmaker_SOURCES = \
|
|||||||
text.h
|
text.h
|
||||||
|
|
||||||
|
|
||||||
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
CPPFLAGS = @CPPFLAGS@ $(DFLAGS) -DLOCALEDIR=\"$(NLSDIR)\"
|
||||||
|
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ host_triplet = @host@
|
|||||||
AS = @AS@
|
AS = @AS@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CPP_PATH = @CPP_PATH@
|
CPP_PATH = @CPP_PATH@
|
||||||
DFLAGS = @DFLAGS@
|
|
||||||
DLLIBS = @DLLIBS@
|
DLLIBS = @DLLIBS@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
GFXLIBS = @GFXLIBS@
|
GFXLIBS = @GFXLIBS@
|
||||||
@@ -106,7 +105,7 @@ EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h DI.h DL.h I.h L.h Q.h GDB.h nana.
|
|||||||
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c cycling.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c extend_pixmaps.h framewin.c framewin.h geomview.c geomview.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c plugin.c plugin.h properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xdnd.h xdnd.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
|
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c cycling.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c extend_pixmaps.h framewin.c framewin.h geomview.c geomview.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c plugin.c plugin.h properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xdnd.h xdnd.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
|
||||||
|
|
||||||
|
|
||||||
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
CPPFLAGS = @CPPFLAGS@ $(DFLAGS) -DLOCALEDIR=\"$(NLSDIR)\"
|
||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
||||||
|
|
||||||
|
|||||||
15
src/gnome.c
15
src/gnome.c
@@ -288,7 +288,7 @@ getWindowLevel(int layer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
Bool
|
||||||
wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
||||||
{
|
{
|
||||||
Atom type_ret;
|
Atom type_ret;
|
||||||
@@ -296,6 +296,7 @@ wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
|||||||
unsigned long nitems_ret;
|
unsigned long nitems_ret;
|
||||||
unsigned long bytes_after_ret;
|
unsigned long bytes_after_ret;
|
||||||
long flags, val, *data = 0;
|
long flags, val, *data = 0;
|
||||||
|
Bool hasHints = False;
|
||||||
|
|
||||||
/* hints */
|
/* hints */
|
||||||
|
|
||||||
@@ -311,6 +312,7 @@ wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
|||||||
if (flags & (WIN_HINTS_SKIP_FOCUS|WIN_HINTS_SKIP_WINLIST)) {
|
if (flags & (WIN_HINTS_SKIP_FOCUS|WIN_HINTS_SKIP_WINLIST)) {
|
||||||
wwin->client_flags.skip_window_list = 1;
|
wwin->client_flags.skip_window_list = 1;
|
||||||
}
|
}
|
||||||
|
hasHints = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* layer */
|
/* layer */
|
||||||
@@ -323,6 +325,7 @@ wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
|||||||
XFree(data);
|
XFree(data);
|
||||||
|
|
||||||
*layer = getWindowLevel(val);
|
*layer = getWindowLevel(val);
|
||||||
|
hasHints = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* workspace */
|
/* workspace */
|
||||||
@@ -336,6 +339,7 @@ wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
|||||||
|
|
||||||
if (val > 0)
|
if (val > 0)
|
||||||
*workspace = val;
|
*workspace = val;
|
||||||
|
hasHints = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reserved area */
|
/* reserved area */
|
||||||
@@ -362,11 +366,14 @@ wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
|||||||
wwin->screen_ptr->reservedAreas = area;
|
wwin->screen_ptr->reservedAreas = area;
|
||||||
|
|
||||||
wScreenUpdateUsableArea(wwin->screen_ptr);
|
wScreenUpdateUsableArea(wwin->screen_ptr);
|
||||||
|
hasHints = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return hasHints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
Bool
|
||||||
wGNOMECheckInitialClientState(WWindow *wwin)
|
wGNOMECheckInitialClientState(WWindow *wwin)
|
||||||
{
|
{
|
||||||
Atom type_ret;
|
Atom type_ret;
|
||||||
@@ -379,7 +386,7 @@ wGNOMECheckInitialClientState(WWindow *wwin)
|
|||||||
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
|
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
|
||||||
&bytes_after_ret,
|
&bytes_after_ret,
|
||||||
(unsigned char**)&data)!=Success || !data)
|
(unsigned char**)&data)!=Success || !data)
|
||||||
return;
|
return False;
|
||||||
|
|
||||||
flags = *data;
|
flags = *data;
|
||||||
|
|
||||||
@@ -399,6 +406,8 @@ wGNOMECheckInitialClientState(WWindow *wwin)
|
|||||||
|
|
||||||
if (flags & WIN_STATE_SHADED)
|
if (flags & WIN_STATE_SHADED)
|
||||||
wwin->flags.shaded = 1;
|
wwin->flags.shaded = 1;
|
||||||
|
|
||||||
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ void wGNOMEUpdateCurrentWorkspaceHint(WScreen *scr);
|
|||||||
|
|
||||||
void wGNOMEUpdateWorkspaceNamesHint(WScreen *scr);
|
void wGNOMEUpdateWorkspaceNamesHint(WScreen *scr);
|
||||||
|
|
||||||
void wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace);
|
Bool wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace);
|
||||||
|
|
||||||
void wGNOMEUpdateClientStateHint(WWindow *wwin, Bool changedWorkspace);
|
void wGNOMEUpdateClientStateHint(WWindow *wwin, Bool changedWorkspace);
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ Bool wGNOMEProcessClientMessage(XClientMessageEvent *event);
|
|||||||
|
|
||||||
void wGNOMERemoveClient(WWindow *wwin);
|
void wGNOMERemoveClient(WWindow *wwin);
|
||||||
|
|
||||||
void wGNOMECheckInitialClientState(WWindow *wwin);
|
Bool wGNOMECheckInitialClientState(WWindow *wwin);
|
||||||
|
|
||||||
Bool wGNOMEProxyizeButtonEvent(WScreen *scr, XEvent *event);
|
Bool wGNOMEProxyizeButtonEvent(WScreen *scr, XEvent *event);
|
||||||
|
|
||||||
|
|||||||
36
src/kwm.c
36
src/kwm.c
@@ -789,8 +789,12 @@ wKWMCheckClientInitialState(WWindow *wwin)
|
|||||||
|
|
||||||
wwin->flags.miniaturized = 1;
|
wwin->flags.miniaturized = 1;
|
||||||
}
|
}
|
||||||
if (getSimpleHint(wwin->client_win, _XA_KWM_WIN_MAXIMIZED, &val) && val) {
|
if (getSimpleHint(wwin->client_win, _XA_KWM_WIN_MAXIMIZED, &val)) {
|
||||||
|
if (val == 2)
|
||||||
|
wwin->flags.maximized = MAX_VERTICAL;
|
||||||
|
else if (val == 1)
|
||||||
|
wwin->flags.maximized = MAX_HORIZONTAL;
|
||||||
|
else if (val == 3)
|
||||||
wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
|
wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
|
||||||
}
|
}
|
||||||
if (getAreaHint(wwin->client_win, _XA_KWM_WIN_GEOMETRY_RESTORE, &area)
|
if (getAreaHint(wwin->client_win, _XA_KWM_WIN_GEOMETRY_RESTORE, &area)
|
||||||
@@ -848,17 +852,25 @@ wKWMCheckClientHintChange(WWindow *wwin, XPropertyEvent *event)
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else if (event->atom == _XA_KWM_WIN_MAXIMIZED) {
|
} else if (event->atom == _XA_KWM_WIN_MAXIMIZED) {
|
||||||
|
int bla = 0;
|
||||||
|
|
||||||
#ifdef DEBUG1
|
#ifdef DEBUG1
|
||||||
printf("got KDE maximize change\n");
|
printf("got KDE maximize change\n");
|
||||||
#endif
|
#endif
|
||||||
flag = !getSimpleHint(wwin->client_win, _XA_KWM_WIN_MAXIMIZED,
|
flag = getSimpleHint(wwin->client_win, _XA_KWM_WIN_MAXIMIZED, &value);
|
||||||
&value) || value;
|
|
||||||
|
|
||||||
if (flag != (wwin->flags.maximized!=0)) {
|
if (flag) {
|
||||||
|
if (value == 3)
|
||||||
|
bla = MAX_VERTICAL|MAX_HORIZONTAL;
|
||||||
|
else if (value == 2)
|
||||||
|
bla = MAX_VERTICAL;
|
||||||
|
else if (value == 1)
|
||||||
|
bla = MAX_HORIZONTAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (flag)
|
if (bla != wwin->flags.maximized) {
|
||||||
wMaximizeWindow(wwin, flag*(MAX_VERTICAL|MAX_HORIZONTAL));
|
if (bla != 0)
|
||||||
|
wMaximizeWindow(wwin, bla);
|
||||||
else
|
else
|
||||||
wUnmaximizeWindow(wwin);
|
wUnmaximizeWindow(wwin);
|
||||||
}
|
}
|
||||||
@@ -1553,8 +1565,14 @@ wKWMUpdateClientStateHint(WWindow *wwin, WKWMStateFlag flags)
|
|||||||
IS_OMNIPRESENT(wwin));
|
IS_OMNIPRESENT(wwin));
|
||||||
}
|
}
|
||||||
if (flags & KWMMaximizedFlag) {
|
if (flags & KWMMaximizedFlag) {
|
||||||
setSimpleHint(wwin->client_win, _XA_KWM_WIN_MAXIMIZED,
|
int value = 0;
|
||||||
wwin->flags.maximized!=0);
|
|
||||||
|
if (wwin->flags.maximized & MAX_VERTICAL)
|
||||||
|
value |= 2;
|
||||||
|
if (wwin->flags.maximized & MAX_HORIZONTAL)
|
||||||
|
value |= 1;
|
||||||
|
|
||||||
|
setSimpleHint(wwin->client_win, _XA_KWM_WIN_MAXIMIZED, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,14 @@
|
|||||||
* Do you think I should move this code into another file? -- ]d
|
* Do you think I should move this code into another file? -- ]d
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
|
|
||||||
|
/* GAH! */
|
||||||
|
#ifdef DRAWSTRING_PLUGIN
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -130,3 +136,5 @@ wPluginDestroyFunction(WFunction *function)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -724,7 +724,7 @@ wScreenInit(int screen_number)
|
|||||||
|
|
||||||
|
|
||||||
/* will only be accounted for in PseudoColor */
|
/* will only be accounted for in PseudoColor */
|
||||||
if (wPreferences.flags.create_stdcmap) {
|
if (wPreferences.flags.createstdcmap) {
|
||||||
rattr.standard_colormap_mode = RCreateStdColormap;
|
rattr.standard_colormap_mode = RCreateStdColormap;
|
||||||
} else {
|
} else {
|
||||||
rattr.standard_colormap_mode = RUseStdColormap;
|
rattr.standard_colormap_mode = RUseStdColormap;
|
||||||
|
|||||||
20
src/window.c
20
src/window.c
@@ -423,19 +423,23 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
|
|||||||
} else {
|
} else {
|
||||||
int tmp_workspace = -1;
|
int tmp_workspace = -1;
|
||||||
int tmp_level = -1;
|
int tmp_level = -1;
|
||||||
|
Bool check;
|
||||||
|
|
||||||
|
check = False;
|
||||||
|
|
||||||
#ifdef MWM_HINTS
|
#ifdef MWM_HINTS
|
||||||
wMWMCheckClientHints(wwin);
|
wMWMCheckClientHints(wwin);
|
||||||
#endif /* MWM_HINTS */
|
#endif /* MWM_HINTS */
|
||||||
|
|
||||||
|
#ifdef GNOME_STUFF
|
||||||
|
check = wGNOMECheckClientHints(wwin, &tmp_level, &tmp_workspace);
|
||||||
|
#endif /* GNOME_STUFF */
|
||||||
|
|
||||||
#ifdef KWM_HINTS
|
#ifdef KWM_HINTS
|
||||||
|
if (!check)
|
||||||
wKWMCheckClientHints(wwin, &tmp_level, &tmp_workspace);
|
wKWMCheckClientHints(wwin, &tmp_level, &tmp_workspace);
|
||||||
#endif /* KWM_HINTS */
|
#endif /* KWM_HINTS */
|
||||||
|
|
||||||
#ifdef GNOME_STUFF
|
|
||||||
wGNOMECheckClientHints(wwin, &tmp_level, &tmp_workspace);
|
|
||||||
#endif /* GNOME_STUFF */
|
|
||||||
|
|
||||||
#ifdef OLWM_HINTS
|
#ifdef OLWM_HINTS
|
||||||
wOLWMCheckClientHints(wwin);
|
wOLWMCheckClientHints(wwin);
|
||||||
#endif /* OLWM_HINTS */
|
#endif /* OLWM_HINTS */
|
||||||
@@ -769,12 +773,18 @@ wManageWindow(WScreen *scr, Window window)
|
|||||||
wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
|
wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Bool bla;
|
||||||
|
|
||||||
|
bla = False;
|
||||||
#ifdef GNOME_STUFF
|
#ifdef GNOME_STUFF
|
||||||
wGNOMECheckInitialClientState(wwin);
|
bla = wGNOMECheckInitialClientState(wwin);
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWM_HINTS
|
#ifdef KWM_HINTS
|
||||||
|
if (!bla)
|
||||||
wKWMCheckClientInitialState(wwin);
|
wKWMCheckClientInitialState(wwin);
|
||||||
#endif
|
#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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user