You are not logged in.
haha yeah I was trying not to say that well compiz was a good idea, if you cut the stupid bling and flying cubes and whatnot
Last edited by el mariachi (2012-03-03 19:35:31)
Offline
ha, I get that too on master branch. I've fixed the
code locally, among some very many changes
I'll report when I push.
cloudef, that's nice I'll look into the code for sure
.:[ git me! ] :.
Offline
New code is up. Feel free to test it.
Many internal changes, most part on restacking clients.
There were problems when floating clients were on screen and one wanted to focus a tiling client.
The borders wouldn't get drawn correctly. Also this should fix the problem with xbmc.
I split many big commits, so now one can pick (git cherry-pick) the commits/features he likes.
for example using the core branch, but wanting toggle panel, and resizing master area:
$ git clone git://github.com/c00kiemon5ter/monsterwm.git
$ cd monsterwm
$ git checkout core
$ git log origin/bloat --oneline | grep -i "toggle" # bloat has all commits
> ...
> f891ac4 make panel toggleable with a shortcut
> ...
$ git cherry-pick f891ac4
$ git log origin/bloat --oneline | grep -i "resize"
> ...
> e037c39 resize master area with shortcuts
> ...
$ git cherry-pick e037c39
$ make
# make clean install
etc, just look at the commit messages and pick the one that you want, should be easy.
conficts may occur, but it's easy to resolve. if you need help just paste here
monsterwm.c: core is 583loc (less than what the project started from) and master is 632.
I hope all works
Last edited by c00kiemon5ter (2012-03-04 14:14:00)
.:[ git me! ] :.
Offline
...
I will push tomorrow a fix for this, and some more stuff.
I've fixed the flickering whith multiple floating windows but that introduced a new behavior with fullscreen windows. The difference is that now, having a fullscreen window and traversing windows, the fullscreen window will flicker, but I don't know if anyone actually does that (looks at other windows when he's opened a fullscreen window).
This is fixed.
I have noticed few bugs.
1. If you open floating window over another floating window, they start flickering. Like they are fighting for which one gets to be visible.
I noticed this when I was configuring deluge and it doesn't really matter to me, but you might want to know about this.
2. Two windows opened, A and B. If I make A floating and then B, window A won't accept any keyboard or btn 1 input. Btn 2 spawns menus like it should.
If switched back to tiling, everything works fine again.
And I have dumped dwm
Offline
1. If you open floating window over another floating window, they start flickering. Like they are fighting for which one gets to be visible. I noticed this when I was configuring deluge and it doesn't really matter to me, but you might want to know about this.
yep, I know that, but I can't think of something to fix this atm.
2. Two windows opened, A and B. If I make A floating and then B, window A won't accept any keyboard or btn 1 input. Btn 2 spawns menus like it should. If switched back to tiling, everything works fine again.
I'm not sure about this. What settings are you using and which branch ?
On master, I open a browser(A) and a terminal(B) in tiling mode and make both floating.
Both accept input when focused. hmm but you might be talking about CLICK_TO_FOCUS.
testing, brb working too here. mmm, could be more specific so I can look into this ?
Thanks
Last edited by c00kiemon5ter (2012-03-04 18:34:37)
.:[ git me! ] :.
Offline
I have floating window A. Then I open window B and float it. Now A doesn't react to anything but right click or kill client bind. After switching to tiling, everything is ok.
And now I have found another odd behaviour, but it occured only once, I can't make it happen again. A and B tiled. After making them both floating, wm doest't react
on keypresses (can't kill or move them, or change layout), but windows respond normally.
I'm using master branch and here is my config.h.
/* see LICENSE for copyright and license */
#ifndef CONFIG_H
#define CONFIG_H
/** buttons **/
#define MOD1 Mod1Mask /* ALT key */
#define MOD4 Mod4Mask /* Super/Windows key */
#define CONTROL ControlMask /* Control key */
#define SHIFT ShiftMask /* Shift key */
/** generic settings **/
#define MASTER_SIZE 0.52
#define SHOW_PANEL True /* show panel by default on exec */
#define TOP_PANEL True /* False mean panel is on bottom */
#define PANEL_HEIGHT 14 /* 0 for no space for panel, thus no panel */
#define DEFAULT_MODE TILE /* TILE MONOCLE BSTACK GRID */
#define ATTACH_ASIDE True /* False means new window is master */
#define FOLLOW_MOUSE True /* Focus the window the mouse just entered */
#define FOLLOW_WINDOW False /* Follow the window when moved to a different desktop */
#define CLICK_TO_FOCUS True /* Focus an unfocused window when clicked */
#define BORDER_WIDTH 1 /* window border width */
#define FOCUS "#E8E2A2" /* focused window border color */
#define UNFOCUS "#E8A8A2" /* unfocused window border color */
#define DESKTOPS 4 /* number of desktops - edit DESKTOPCHANGE keys to suit */
#define DEFAULT_DESKTOP 0 /* the desktop to focus on exec */
#define MINWSZ 50 /* minimum window size in pixels */
/** open applications to specified desktop. if desktop is negative, then spawn in current **/
static const AppRule rules[] = { \
/* class desktop follow float */
{ "MPlayer", -1, False, True },
{ "Gimp", -1, False, True },
{ "gcolor2", -1, False, True },
{ "Galculator", -1, False, True },
{ "gsimplecal", -1, False, True },
};
/** commands **/
static const char *termcmd[] = { "urxvtc", NULL };
static const char *menucmd[] = { "dmenu_run", "-i", "-fn", "-*-ohsnap-medium-*-*-*-14-*-*-*-*-*-iso8859-*", "-nb", "#2D2D2D", "-nf", "#E8A2A2", "-sb", "#2D2D2D", "-sf", "#E8E8A2", NULL };
static const char *torrentcmd[] = { "deluge", NULL };
static const char *filemancmd[] = { "spacefm", NULL };
static const char *browsercmd[] = { "dwb", NULL };
static const char *altbrowsercmd[] = { "firefox-nightly", NULL };
static const char *imcmd[] = { "pidgin", NULL };
static const char *vboxcmd[] = { "VirtualBox", "-style", "GTK", NULL };
static const char *volmcmd[] = { "sh", "/home/fuchs/bin/twmn_volume.sh", "toggle", NULL };
static const char *voldcmd[] = { "sh", "/home/fuchs/bin/twmn_volume.sh", "1-", NULL };
static const char *volucmd[] = { "sh", "/home/fuchs/bin/twmn_volume.sh", "1+", NULL };
static const char *screenshotcmd[] = { "scrot", "-d", "1", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *netcmd[] = { "urxvtc", "-e", "wicd-curses", NULL };
static const char *calculatorcmd[] = { "galculator", NULL };
static const char *youtubecmd[] = { "gtk-youtube-viewer", NULL };
static const char *officecmd[] = { "sh", "/home/fuchs/bin/office_menu.sh", NULL };
#define DESKTOPCHANGE(K,N) \
{ MOD1, K, change_desktop, {.i = N}}, \
{ MOD1|ShiftMask, K, client_to_desktop, {.i = N}},
/** Shortcuts **/
#include <X11/XF86keysym.h>
static key keys[] = {
/* modifier key function argument */
{ MOD1|SHIFT, XK_m, togglepanel, {NULL}},
{ MOD1, XK_BackSpace, focusurgent, {NULL}},
{ MOD1|SHIFT, XK_c, killclient, {NULL}},
{ MOD1, XK_Right, next_win, {NULL}},
{ MOD1, XK_Left, prev_win, {NULL}},
{ MOD1|SHIFT, XK_Left, resize_master, {.i = -10}}, /* decrease */
{ MOD1|SHIFT, XK_Right, resize_master, {.i = +10}}, /* increase */
{ MOD1|SHIFT, XK_Up, resize_stack, {.i = -10}}, /* shrink */
{ MOD1|SHIFT, XK_Down, resize_stack, {.i = +10}}, /* grow */
{ MOD1|CONTROL, XK_Left, rotate, {.i = PREV}},
{ MOD1|CONTROL, XK_Right, rotate, {.i = NEXT}},
{ MOD1|SHIFT, XK_h, rotate_filled, {.i = PREV}},
{ MOD1|SHIFT, XK_l, rotate_filled, {.i = NEXT}},
{ MOD1, XK_Tab, last_desktop, {NULL}},
{ MOD1, XK_Return, swap_master, {NULL}},
{ MOD1, XK_Down, move_down, {NULL}},
{ MOD1, XK_Up, move_up, {NULL}},
{ MOD1, XK_t, switch_mode, {.i = TILE}},
{ MOD1, XK_m, switch_mode, {.i = MONOCLE}},
{ MOD1, XK_b, switch_mode, {.i = BSTACK}},
{ MOD1, XK_g, switch_mode, {.i = GRID}},
{ MOD1|CONTROL, XK_r, quit, {.i = 0}}, /* quit with exit value 0 */
{ MOD1|CONTROL, XK_q, quit, {.i = 1}}, /* quit with exit value 1 */
{ MOD4, XK_Return, spawn, {.com = termcmd}},
{ MOD4, XK_t, spawn, {.com = torrentcmd}},
{ MOD4, XK_f, spawn, {.com = filemancmd}},
{ MOD4, XK_b, spawn, {.com = browsercmd}},
{ MOD4|SHIFT, XK_b, spawn, {.com = altbrowsercmd}},
{ MOD4, XK_y, spawn, {.com = youtubecmd}},
{ MOD4, XK_o, spawn, {.com = officecmd}},
{ MOD4, XK_p, spawn, {.com = imcmd}},
{ MOD4, XK_v, spawn, {.com = vboxcmd}},
{ MOD4, XK_F2, spawn, {.com = netcmd}},
{ CONTROL|SHIFT, XK_Escape, spawn, {.com = lockcmd}},
{ 0, XK_Menu, spawn, {.com = menucmd}},
{ 0, XF86XK_Calculator, spawn, {.com = calculatorcmd}},
{ 0, XF86XK_AudioLowerVolume, spawn, {.com = voldcmd}},
{ 0, XF86XK_AudioMute, spawn, {.com = volmcmd}},
{ 0, XF86XK_AudioRaiseVolume, spawn, {.com = volucmd}},
{ 0, XK_Print, spawn, {.com = screenshotcmd}},
DESKTOPCHANGE( XK_1, 0)
DESKTOPCHANGE( XK_2, 1)
DESKTOPCHANGE( XK_3, 2)
DESKTOPCHANGE( XK_4, 3)
};
static Button buttons[] = {
{ MOD1, Button1, mousemotion, {.i = MOVE}},
{ MOD1, Button2, killclient, {NULL}},
{ MOD1, Button3, mousemotion, {.i = RESIZE}},
};
#endif
Offline
I can't see it, and I can't see why something like that would happen.
Using your config and master branch, I startx, and start dwb (Mod4+b)
I resize it(so it's floating) and center it on the screen, and do a random search.
I now open a terminal (Mod4+Enter) and write random commands.
I resize and move the terminal around. I write some more random stuff.
for i in {1..10000}; do echo $i; done
so I can scroll that too.
Going back to dwb (either by Alt+Right or moving the mouse over it) I can still scroll, click urls etc.
Going back to the terminal, all is fine too, scrolling, writing, etc
also tried with more windows, but can't reproduce it. If I'm doing something wrong please tell me.
I will try to play more with the master branch and how it goes.
.:[ git me! ] :.
Offline
Šaran wrote:1. If you open floating window over another floating window, they start flickering. Like they are fighting for which one gets to be visible. I noticed this when I was configuring deluge and it doesn't really matter to me, but you might want to know about this.
yep, I know that, but I can't think of something to fix this atm.
What about using XMapRaised instead of XMapWindow ? This way the windows get stacked properly and shouldnt fight on the z-axis anymore.
Offline
What about using XMapRaised instead of XMapWindow ? This way the windows get stacked properly and shouldnt fight on the z-axis anymore.
That wouldn't work either. Here is what's happening:
I'm using a single border between clients. For example in tile mode, the master area is separated from the stack with a single border. In onther words if one specifies a 3px border, the master area is separated from the stack with 3px, not 6px - 3px for the master window, and 3px for the stack windows.
This means that the single border is actually an emulation. In reality there are two borders, but the current window is overlapping the others, so one can see all four sides of the border highlghted.
If it wasn't for that it'd be easy to fix everything else, and there would also be less calculations.
Now why does that matter ? Remember we want floating client on top always.
If there are no floating clients, all we have to do is raise the current window.
If there are floating clients, then we have to raise the current window above all but the floating windows.
So XRaiseWindow and XMapRaised both fail here, as they put the window on top.
Previously the code used XRaiseWindow, but when a floating client was around, the window wouldn't be raised, in order to not go over the floating window. As the current window was not raised, sometimes the border would get the correct highlighting; that is some sides would be shawn as highlighted because other windows (window borders) overlapped the current window's borders (and the current window would be raised because there were floating clients around).
Using XRaiseWindow to get the current client on top and then raise all floating clients, would cause a lot of flickering.
What happens now, is I check if the window is floating, and if it is I place on top of the current window, if it is not I place it below the current window. This is done with XConfigureWindow. (Notice you cannot use BottomIf or TopIf, because that will get the clients under the panel; which means toggling the panel, would have the panel on top of the clients).
And here comes to the second problem; many floating clients (and probably overlapping).
When there are many floating clients overlapping, you have to restack those too.
Previously, if there were many floating clients, I would find them and raise them (thus the flickering).
Now I only raise the current window if it is floating, so it's on top of the floating clients, and I leave the rest of the stacking order as it was. That's why now, the floating clients are always on the way one behind the other - they preserve their ordering, as their stacking positions don't change - and the ones that are behind only come on top when highlighted.
For the 1st problem, stacking order of tiled windows because of the borders, I think there isn't much to be done. If I use double borders (that is don't overlap window borders), this can be simplyfied greatly.
For the 2nd problem, preserving floating clients on top and restacking them so the current appears on top, there may be better solutions.
For anyone interested, it's update_current(client *c) function, in the code.
The cleanest, easiest and most uniform thing would be to have borders for all windows (as monocleborders branch has) not overlapping, and using XConfigureWindow to raise tiled clients, and XRaiseWindow to raise floating clients.
I've been thinking on changing the default (to monocleborders) and having borderless windows maintained as a patch.
But I won't do it, unless people want it. So speak up
Last edited by c00kiemon5ter (2012-03-04 23:28:41)
.:[ git me! ] :.
Offline
Having problems with matlab here's a screenshot. (http://i.imgur.com/uneQh.png)
No matter what mode i use it just won't display. I can click the menus and submenus will appear. -debug doesn't print any message.
Any ideas?
I'm using the (latest) Master branch, no patches.
Oh by the way, good job cookie.
Offline
@c00kiemon5ter
This version is working as good as before. I tried to use as many clients as i can on one workspace to produce any overlapping bugs but it is all working as it should be. I'm on "monocleborders" branch.
Btw, if you wanna change default behaviour, please leave us option to have only one border between 2 clients in tile mode on monocleborders branch. It is the reason why we like it so much, among other things.
Offline
I can't see it, and I can't see why something like that would happen.
Using your config and master branch, I startx, and start dwb (Mod4+b)
I resize it(so it's floating) and center it on the screen, and do a random search.
I now open a terminal (Mod4+Enter) and write random commands.
I resize and move the terminal around. I write some more random stuff.for i in {1..10000}; do echo $i; done
so I can scroll that too.
Going back to dwb (either by Alt+Right or moving the mouse over it) I can still scroll, click urls etc.
Going back to the terminal, all is fine too, scrolling, writing, etc
also tried with more windows, but can't reproduce it. If I'm doing something wrong please tell me.I will try to play more with the master branch and how it goes.
You're doing it just fine, but it's still same at my end.
EDIT: I have tried core branch with different focus options, same shit.
For the 1st problem, stacking order of tiled windows because of the borders, I think there isn't much to be done. If I use double borders (that is don't overlap window borders), this can be simplyfied greatly.
For the 2nd problem, preserving floating clients on top and restacking them so the current appears on top, there may be better solutions.
For anyone interested, it's update_current(client *c) function, in the code.The cleanest, easiest and most uniform thing would be to have borders for all windows (as monocleborders branch has) not overlapping, and using XConfigureWindow to raise tiled clients, and XRaiseWindow to raise floating clients.
I've been thinking on changing the default (to monocleborders) and having borderless windows maintained as a patch.
But I won't do it, unless people want it. So speak up
Double borders aren't problem at all, at least for people who use 1px border.
Borderless monocle looks better, but I think we should spend less time looking at borders and more time at windows themselves.
Current monster's behaviour was dwm's default way back, but devs have changed it for same reasons.
To sum up, to me, borders are irrelevant. Stable wm that behaves like it should is much more important.
Thank you for your time and listening to users wishes!
Last edited by Šaran (2012-03-05 10:09:54)
Offline
hear hear!
Offline
Having problems with matlab here's a screenshot. (http://i.imgur.com/uneQh.png)
No matter what mode i use it just won't display. I can click the menus and submenus will appear. -debug doesn't print any message. Any ideas?
I think Matlab uses Java for its interface, try installing "wmname" from [community] and putting
wmname LG3D
in ~/.xinitrc, before starting monsterwm
btw, I've used scilab only, and works good. Matlab is not free right ?
@c00kiemon5ter
This version is working as good as before. I tried to use as many clients as i can on one workspace to produce any overlapping bugs but it is all working as it should be. I'm on "monocleborders" branch.
thanks for the heads up kuraku that's good
You're doing it just fine, but it's still same at my end.
EDIT: I have tried core branch with different focus options, same shit.
that's weird. I will look all over it again. Just want to make sure one thing - did you *pull* or *clone* the repo, before building ? because pulling will most probably not work.
Double borders aren't problem at all, at least for people who use 1px border.
Borderless monocle looks better, but I think we should spend less time looking at borders and more time at windows themselves.
To sum up, to me, borders are irrelevant. Stable wm that behaves like it should is much more important.
agreed, but that's what was causing part of the trouble.
Current monster's behaviour was dwm's default way back, but devs have changed it for same reasons.
heh, I had no idea, I only used dwm-5.8 and just a bit of 5.9
also thanks everyone it seems you like single border and borderless windows so I'll keep it that way for now.
Last edited by c00kiemon5ter (2012-03-05 11:53:05)
.:[ git me! ] :.
Offline
if you give me your address I'll send you a nice jar of cookies
Offline
Just want to make sure one thing - did you *pull* or *clone* the repo, before building ? because pulling will most probably not work.
I have done:
git clone -b core *repo*
And like I said before, it doesn't really matter whether that is happening or not, JUST floating windows with tiling wm is more of a sci fi use scenario.
I guess I ate too much cookies when I noticed that.
Offline
@c00kiemon5ter
Thank you it's working perfectly now.
Yes matlab uses java for it's interface, and no it's not free, but some people are stubborn and just can't/don't want to learn something different.
I will give scilab a try.
Offline
if you give me your address I'll send you a nice jar of cookies
haha x)
I pushed some more changes. minified some more code.
mosterwm.c is 565loc in core, and 614 in master.
That's pretty good. Things should be working as before.
Last edited by c00kiemon5ter (2012-03-09 01:29:41)
.:[ git me! ] :.
Offline
500SLOCs would be beautiful
Offline
Found a bug: If I put in config.h "SHOW_PANEL False" and define a panel height, like "12", the client's bottom isn't shown on the display, there are 12 pixels missing.
Offline
Found a bug: If I put in config.h "SHOW_PANEL False" and define a panel height, like "12", the client's bottom isn't shown on the display, there are 12 pixels missing.
Thanks, should be fixed now
500SLOCs would be beautiful
that's not very feasible unless you remove the layouts you don't use, and some floating clients' code, or the prototypes (47 lines alone)
Last edited by c00kiemon5ter (2012-03-06 22:50:34)
.:[ git me! ] :.
Offline
very nice
Free your mind
Offline
@c00kiemon5ter
The bug that whooper reported is still present ina a way. In monocleborders branch, i have no borders on gui programs when i first start them. I have to start another client to get borders (or create any client on workspace in any mode).
I managed to play a little with it and i discovered that gui clients got no borders at start only if you start app from different workspace so:
- If i set firefox to launch at 1st workspace, in config.h, and i launch it from 1st workspace, it will show borders;
- If i set firefox to launch at 1st workspace, in config.h, and i launch it from 2nd workspace, it will not show borders.
Not sure if this is present in all branches but it is annoying. monsterwm session is started at 2nd workspace at my pc (there are 5 of them) and i launch everything from there via keyboard shortcuts without leaving initial workspace (2nd in this case).
Last edited by kuraku (2012-03-09 02:45:56)
Offline