From michael at cadilhac.name Fri Dec 13 22:59:43 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Fri, 13 Dec 2013 23:59:43 +0100 Subject: The correct way of adding a systray (stalonetray) Message-ID: Hi there everyone; Resuming my question on systrays, I'm searching for the right way (read: CLFSM way) for such an addition. I went, as Philippe suggested, for using a standalone systray program, stalonetray. Once launched, it has three defects: 1- Position. Ideally, it'd be located in the toolbar (the latter coming from toolbar.lisp). 2- Rotation. When circulating among windows, it shouldn't be part of the cycle. 3- Membership in a frame. The systray should be frame agnostic. For 1 and 3, I have no clue, and require some help :-). For 1, I just move the little tray up when I start stalonetray, but a programmatic way would be better for sure. As for 2, I modified select-previous|next-child-simple adding: (let ((current-head (car child))) (loop do (setf child (rotate-list child)) until (or (not (xlib:window-p (car child))) (eq current-head (car child)) (not (eq (window-type (car child)) :dock))))) but it seems that it requires a little change in window-type so that the _NET_WM_WINDOW_TYPE is queried *before* the wm-size-hints are checked (see attached). It does work then, but is it the right way to do things? Thanks! Unrelated; in the Makefile, shouldn't $(DESTDIR)/man/man.1/clfswm.1 nowadays read $(DESTDIR)/share/man/man1/clfswm.1 ? -------------- next part -------------- diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 8dae671..55873a2 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -515,7 +515,12 @@ they should be windows. So use this function to make a window out of them." "Return one of :desktop, :dock, :toolbar, :utility, :splash, :dialog, :transient, :maxsize and :normal." (when (xlib:window-p window) - (or (and (let ((hints (xlib:wm-normal-hints window))) + (or (let ((net-wm-window-type (xlib:get-property window :_NET_WM_WINDOW_TYPE))) + (when net-wm-window-type + (dolist (type-atom net-wm-window-type) + (when (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+) + (return (cdr (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+))))))) + (and (let ((hints (xlib:wm-normal-hints window))) (and hints (or (and (xlib:wm-size-hints-max-width hints) (< (xlib:wm-size-hints-max-width hints) (x-drawable-width *root*))) (and (xlib:wm-size-hints-max-height hints) @@ -523,11 +528,6 @@ they should be windows. So use this function to make a window out of them." (xlib:wm-size-hints-min-aspect hints) (xlib:wm-size-hints-max-aspect hints)))) :maxsize) - (let ((net-wm-window-type (xlib:get-property window :_NET_WM_WINDOW_TYPE))) - (when net-wm-window-type - (dolist (type-atom net-wm-window-type) - (when (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+) - (return (cdr (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+))))))) (and (xlib:get-property window :WM_TRANSIENT_FOR) :transient) :normal))) From renaud at casenave-pere.fr Mon Dec 2 02:30:00 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Mon, 02 Dec 2013 11:30:00 +0900 Subject: Conkeror hangs when run using do-shell Message-ID: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> Hi, I have configured clfswm to launch some software using bindings, and I use do-shell for that. It usually works fine (in particular for konsole, emacs, skype...) but for conkeror, it always hangs after some time and I have no idea why. If I launch it using konsole (itself launch using do-shell from clfswm), it works fine. When run on the command-line, conkeror floods it with warning messages so I would have guessed it hangs because of a full stream buffer but it also hangs when run with standard output and standard error redirected to /dev/null so I am not so sure anymore... If you have some pointers as to where to look to find the problem, I would be happy to investigate further. On a related note, you added an option to prevent a window from stealing the focus and it worked for some time but it doesn't anymore... As far as clfswm is concerned, it seems it doesn't transfer the focus itself (the frame decoration still show the former window to be in focus) but the keyboard input is transferred to the new window... I might look into it when I have time, as I think you don't use this feature yourself it might be better if I try and fix it myself but I still wanted to let you know. Thanks, -- Renaud Casenave-P?r? From michael at cadilhac.name Thu Dec 5 13:36:14 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Thu, 5 Dec 2013 14:36:14 +0100 Subject: Expose mode: strange failures. In-Reply-To: References: Message-ID: On Wed, Dec 4, 2013 at 10:43 PM, Micha?l Cadilhac wrote: > A second crash I got came from a window with German words in the > title. The reported error was: > Processing "genug - W?rterbuch Deutsch-Englisch - WordReference.com - > Mozilla Firefox": type=NORMAL # > CLFSWM Error: The value #\LATIN_SMALL_LETTER_O_WITH_DIAERESIS > is not of type > BASE-CHAR.. > Reinitializing... For this crash, which was caused by the shuffle key rather than Expose, a SBCL/CLISP clash may be to be blamed, namely: In CLISP, BASE-CHAR and CHARACTER are equivalent and include all of Unicode (16 bit) and in SBCL: With the :SB-UNICODE on *features* (the default), however, base-char and character are distinct: character encompasses the set of all 1114112 characters, while base-char represents the set of the first 128 characters. I don't know where this comes in play explicitly, if it does, in CLFSWM, but switching to CLISP fixes the crash. In shuffle mode, the accents are displayed correctly, while in Expose, they are replaced by question marks; apart from this inconsistency, it works. Let's hope it automagically fixed the other crash I had --- though some manual type-check in the code would prevent a crash. Happy hacking, M. From michael at cadilhac.name Mon Dec 9 21:46:11 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Mon, 9 Dec 2013 22:46:11 +0100 Subject: Expose mode: strange failures. In-Reply-To: References: <87ppp92147.fsf@minideb.elcforest> <87lhzxapx5.fsf@minideb.elcforest> Message-ID: On Sat, Dec 7, 2013 at 1:39 PM, Micha?l Cadilhac wrote: > On Sat, Dec 7, 2013 at 11:58 AM, Philippe Brochard > wrote: > >> Micha?l Cadilhac writes: >>> Merci! I still have the random crashes with Expose mode though. > >> Ok, I spot it. I'm trying to solve it. > > Good news! Probaby related: when I select a window using the mouse in expose mode, I get a violent crash. The error is as follows: *** - SYSTEM::%STRUCTURE-REF: # is not a structure of type EXPOSE-CHILD The following restarts are available: TOP-LEVEL :R1 Return to clfswm's top level [eval.d:573] reset() found no driver frame (sp=0xbfb2b490-0xbfb26c60) Exiting on signal 6. BTW, as I've already hijacked my own thread: why is it that deleting a frame is so hard to do? I was expecting a "delete current frame" command in the menu, which is not present. Is it somewhat contrary to CLFSWM philosophy? Also, delete-frame-by-name is not working in certain cases (see http://michael.cadilhac.name/public/clfswm-delete.mkv ). Bests, M. From michael at cadilhac.name Wed Dec 18 15:28:08 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Wed, 18 Dec 2013 16:28:08 +0100 Subject: Moving a window to another frame (and a few bugs) In-Reply-To: <87haa68ar1.fsf@gmail.com> References: <87haa68ar1.fsf@gmail.com> Message-ID: Hi Andrea, thanks for your answer! On Wed, Dec 18, 2013 at 4:00 PM, Andrea De Michele wrote: > > > Micha?l Cadilhac writes: > >> Hi there people! >> >> I have a hard time moving a window in other frames. Basically, >> neither "Move current child to a named friend" nor the selection menu >> do anything. Am I missing something? >> > I'm not sure if it is the right things to do but I use the functions > cut-current-child and paste-selection; I added to my .clfswmrc these > key bindings: > > (define-main-key ("c" :mod-4) 'copy-current-child) > (define-main-key ("x" :mod-4) 'cut-current-child) > (define-main-key ("v" :mod-4) 'paste-selection) Yes, this is what I meant by the "selection menu." (Menu -> s). Now that I try it again, with a fresh session, it does work! :-) Either I was in an auto-restarted instance of CLFSWM, which are quite unstable, or I just failed to use the selection thingy properly, which is more than likely. Thanks again; M. From michael at cadilhac.name Wed Dec 18 13:04:47 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Wed, 18 Dec 2013 14:04:47 +0100 Subject: Moving a window to another frame (and a few bugs) Message-ID: Hi there people! I have a hard time moving a window in other frames. Basically, neither "Move current child to a named friend" nor the selection menu do anything. Am I missing something? Unrelated, a two bugs. First, I got a crash with the following error: SYSTEM::%STRUCTURE-REF: NIL is not a structure of type ROOT Second, whenever I am in a tiling mode and not focused on the main window, present-clfswm-terminal shows the terminal window without focusing into it. Clicking on said window has no effect, I just can't get the window to be focused. Thanks! From pbrochard at common-lisp.net Fri Dec 13 21:56:04 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 22:56:04 +0100 Subject: Expose mode: strange failures. In-Reply-To: (=?iso-8859-1?Q?=22Micha=EBl?= Cadilhac"'s message of "Mon, 9 Dec 2013 22:46:11 +0100") References: <87ppp92147.fsf@minideb.elcforest> <87lhzxapx5.fsf@minideb.elcforest> Message-ID: <87r49g8lfv.fsf@minideb.elcforest> Micha?l Cadilhac writes: > On Sat, Dec 7, 2013 at 1:39 PM, Micha?l Cadilhac wrote: >> On Sat, Dec 7, 2013 at 11:58 AM, Philippe Brochard >> wrote: >> >>> Micha?l Cadilhac writes: >>>> Merci! I still have the random crashes with Expose mode though. >> >>> Ok, I spot it. I'm trying to solve it. >> >> Good news! > > Probaby related: when I select a window using the mouse in expose > mode, I get a violent crash. The error is as follows: > > *** - SYSTEM::%STRUCTURE-REF: # is not a > structure of type EXPOSE-CHILD > The following restarts are available: > TOP-LEVEL :R1 Return to clfswm's top level > > [eval.d:573] reset() found no driver frame (sp=0xbfb2b490-0xbfb26c60) > Exiting on signal 6. > Not related to it. I've forgotten to update this part of code when I have written fastswitch-mode :-( Many thanks for the report. > BTW, as I've already hijacked my own thread: why is it that deleting a > frame is so hard to do? I was expecting a "delete current frame" > command in the menu, which is not present. Is it somewhat contrary to > CLFSWM philosophy? Also, delete-frame-by-name is not working in > certain cases (see > http://michael.cadilhac.name/public/clfswm-delete.mkv ). > It is bound to second_mode+delete or in the child menu (delete also). It's not limited to frames, you can also use it on window. But if you feel it's more appropriate to add also an entry in the frame window, we can do so. Also, I've fixed the delete-frame-by-name behaviour. Many thanks for all those reports. There is functions I don't use every days. So it's more difficult to spot bugs in them. > Bests, > Regards, Philippe From renaud at casenave-pere.fr Sat Dec 14 05:04:55 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Sat, 14 Dec 2013 14:04:55 +0900 Subject: Conkeror hangs when run using do-shell In-Reply-To: <87mwk48jks.fsf@minideb.elcforest> (Philippe Brochard's message of "Fri, 13 Dec 2013 23:36:19 +0100") References: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> <87haal1zi9.fsf@minideb.elcforest> <871u1nu7hx.fsf@zahikel.casenave.fr> <87mwk48jks.fsf@minideb.elcforest> Message-ID: <87haacauq0.fsf@zahikel.casenave.fr> On Sat, Dec 14 2013, Philippe Brochard wrote: > Your patch is ok and applied in your name. I've removed the > *steal-focus* part since emacs have not to steal the focus when it's not > on the same frame as the focused child. (Maybe I'll rethink this part > latter). I see, no need to check for *steal-focus* in focus-in because you already do it in configure-request. Thanks for the commit. -- Renaud Casenave-P?r? From andrea.demichele at gmail.com Wed Dec 18 15:00:34 2013 From: andrea.demichele at gmail.com (Andrea De Michele) Date: Wed, 18 Dec 2013 16:00:34 +0100 Subject: Moving a window to another frame (and a few bugs) In-Reply-To: (=?utf-8?Q?=22Micha=C3=ABl?= Cadilhac"'s message of "Wed, 18 Dec 2013 14:04:47 +0100") References: Message-ID: <87haa68ar1.fsf@gmail.com> Micha?l Cadilhac writes: > Hi there people! > > I have a hard time moving a window in other frames. Basically, > neither "Move current child to a named friend" nor the selection menu > do anything. Am I missing something? > I'm not sure if it is the right things to do but I use the functions cut-current-child and paste-selection; I added to my .clfswmrc these key bindings: (define-main-key ("c" :mod-4) 'copy-current-child) (define-main-key ("x" :mod-4) 'cut-current-child) (define-main-key ("v" :mod-4) 'paste-selection) After that I can move the windows from one frame to another like text in a word processor (S-x: cut, S-v: paste). > Unrelated, a two bugs. First, I got a crash with the following error: > SYSTEM::%STRUCTURE-REF: NIL is not a structure of type ROOT > Second, whenever I am in a tiling mode and not focused on the main > window, present-clfswm-terminal shows the terminal window without > focusing into it. Clicking on said window has no effect, I just can't > get the window to be focused. > > Thanks! > -- Andrea De Michele From pbrochard at common-lisp.net Fri Dec 6 20:08:56 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 06 Dec 2013 21:08:56 +0100 Subject: Expose mode: strange failures. In-Reply-To: (=?iso-8859-1?Q?=22Micha=EBl?= Cadilhac"'s message of "Thu, 5 Dec 2013 14:36:14 +0100") References: Message-ID: <87ppp92147.fsf@minideb.elcforest> Micha?l Cadilhac writes: > On Wed, Dec 4, 2013 at 10:43 PM, Micha?l Cadilhac wrote: > >> A second crash I got came from a window with German words in the >> title. The reported error was: >> Processing "genug - W?rterbuch Deutsch-Englisch - WordReference.com - >> Mozilla Firefox": type=NORMAL # >> CLFSWM Error: The value #\LATIN_SMALL_LETTER_O_WITH_DIAERESIS >> is not of type >> BASE-CHAR.. >> Reinitializing... > > For this crash, which was caused by the shuffle key rather than > Expose, a SBCL/CLISP clash may be to be blamed, namely: > > In CLISP, BASE-CHAR and CHARACTER are equivalent and include all of > Unicode (16 bit) > > and in SBCL: > > With the :SB-UNICODE on *features* (the default), however, base-char > and character are distinct: character encompasses the set of all > 1114112 characters, while base-char represents the set of the first > 128 characters. > > I don't know where this comes in play explicitly, if it does, in > CLFSWM, but switching to CLISP fixes the crash. In shuffle mode, the > accents are displayed correctly, while in Expose, they are replaced by > question marks; apart from this inconsistency, it works. Let's hope > it automagically fixed the other crash I had --- though some manual > type-check in the code would prevent a crash. > SBCL is more sensible than CLISP for unicode strings. This is why I use the (ugly but works) ensure-printable function. But I forgot one in the new fastswitch-mode code. This is hopefully fixed with the commit 544f93c. Thanks for the report, Philippe From ales.guzik at gmail.com Tue Dec 3 19:11:12 2013 From: ales.guzik at gmail.com (Ales Guzik) Date: Tue, 3 Dec 2013 22:11:12 +0300 Subject: Problem with geogebra In-Reply-To: <87haapdcbc.fsf@argh.homenet.telecomitalia.it> References: <87haapdcbc.fsf@argh.homenet.telecomitalia.it> Message-ID: Hi Andrea, Looks like it's a java application. You may try to add the following line to your .xinitrc: export _JAVA_AWT_WM_NONREPARENTING=1 It have solved similar problems for me quite a while ago. Hope it helps, Ales 03.12.2013 21:23 ???????????? "Andrea De Michele" < andrea.demichele at gmail.com> ???????: > > I use clfswm as my main window manager and I think it is fantastic. Before > I > used stumpwm. Thank you for the software. > > Now I have a problem with geogebra, its window is all grey no gadgets > (icons, menu, plot-pane, ...). > > I use arch linux, sbcl, and clfswm version from quicklisp. > > > -- > Andrea De Michele > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at cadilhac.name Fri Dec 6 21:35:15 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Fri, 6 Dec 2013 22:35:15 +0100 Subject: Expose mode: strange failures. In-Reply-To: <87ppp92147.fsf@minideb.elcforest> References: <87ppp92147.fsf@minideb.elcforest> Message-ID: On Fri, Dec 6, 2013 at 9:08 PM, Philippe Brochard wrote: > SBCL is more sensible than CLISP for unicode strings. This is why I use > the (ugly but works) ensure-printable function. But I forgot one in the > new fastswitch-mode code. This is hopefully fixed with the commit > 544f93c. Merci! I still have the random crashes with Expose mode though. Anything I can do to give you a more meaningful report? Is there a way to have a backtrace for instance? And two other unrelated things, if I may hijack my own thread: - I modified reorder-brother-simple so that it behaves like reorder-brother when called with (child-root-p (current-child)), that is, (leave-frame) then (enter-frame). I believe this is more consistent and should be done in master. - If I wanted to add a system tray to the toolbar, would https://github.com/lucashpandolfo/stumpwm-tray be a good start? Merci d'avance! Best, M. From pbrochard at common-lisp.net Sat Dec 7 10:58:14 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 07 Dec 2013 11:58:14 +0100 Subject: Expose mode: strange failures. In-Reply-To: (=?iso-8859-1?Q?=22Micha=EBl?= Cadilhac"'s message of "Fri, 6 Dec 2013 22:35:15 +0100") References: <87ppp92147.fsf@minideb.elcforest> Message-ID: <87lhzxapx5.fsf@minideb.elcforest> Micha?l Cadilhac writes: > On Fri, Dec 6, 2013 at 9:08 PM, Philippe Brochard > wrote: >> SBCL is more sensible than CLISP for unicode strings. This is why I use >> the (ugly but works) ensure-printable function. But I forgot one in the >> new fastswitch-mode code. This is hopefully fixed with the commit >> 544f93c. > > Merci! I still have the random crashes with Expose mode though. > Anything I can do to give you a more meaningful report? Is there a > way to have a backtrace for instance? > Ok, I spot it. I'm trying to solve it. For your request for a backtrace. You have to use the main-unprotected function. Start a lisp, load clfswm with asdf and then start clfswm with main-unprotected instead of main. > And two other unrelated things, if I may hijack my own thread: > - I modified reorder-brother-simple so that it behaves like > reorder-brother when called with (child-root-p (current-child)), that > is, (leave-frame) then (enter-frame). I believe this is more > consistent and should be done in master. > Ok. Can you send the patch you want to be applied? > - If I wanted to add a system tray to the toolbar, would > https://github.com/lucashpandolfo/stumpwm-tray be a good start? > Yes this is a way. I haven't test it in stumpwm and it seems there is some code related to stumpwm (for example (in-package :stumpwm)). You can also look at some independent systray project. > Merci d'avance! > De rien. > Best, > Regards, Philippe From pbrochard at common-lisp.net Fri Dec 6 20:43:42 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 06 Dec 2013 21:43:42 +0100 Subject: Conkeror hangs when run using do-shell In-Reply-To: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> ("Renaud \=\?iso-8859-1\?Q\?Casenave-P\=E9r\=E9\=22's\?\= message of "Mon, 02 Dec 2013 11:30:00 +0900") References: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> Message-ID: <87haal1zi9.fsf@minideb.elcforest> Renaud Casenave-P?r? a ?crit : > Hi, > Hi, > I have configured clfswm to launch some software using bindings, and I use > do-shell for that. > It usually works fine (in particular for konsole, emacs, skype...) but for > conkeror, it always hangs after some time and I have no idea why. If I launch it > using konsole (itself launch using do-shell from clfswm), it works fine. > > When run on the command-line, conkeror floods it with warning messages so I > would have guessed it hangs because of a full stream buffer but it also hangs > when run with standard output and standard error redirected to /dev/null so I > am not so sure anymore... If you have some pointers as to where to look to find > the problem, I would be happy to investigate further. > All works as expected here with clisp and sbcl. The code you send is working for me. I use conkeror every days and I've never seen a hang up. Please can you have a deeper look. And report any problem or suspect behaviour. > On a related note, you added an option to prevent a window from stealing the > focus and it worked for some time but it doesn't anymore... As far as clfswm is > concerned, it seems it doesn't transfer the focus itself (the frame decoration > still show the former window to be in focus) but the keyboard input is > transferred to the new window... I might look into it when I have time, as I > think you don't use this feature yourself it might be better if I try and fix it > myself but I still wanted to let you know. > The same, all works as expected here with those lines in my .clfsmwrc ;-------------------------------------------------- (setf *steal-focus* nil) (setf *default-nw-hook* 'leave-focus-frame-nw-hook) ;-------------------------------------------------- Please, can you give use more details on what you expect. > Thanks, > Philippe From pbrochard at common-lisp.net Wed Dec 4 14:59:27 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Wed, 04 Dec 2013 15:59:27 +0100 Subject: Conkeror hangs when run using do-shell In-Reply-To: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> ("Renaud \=\?iso-8859-1\?Q\?Casenave-P\=E9r\=E9\=22's\?\= message of "Mon, 02 Dec 2013 11:30:00 +0900") References: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> Message-ID: <878uw08xww.fsf@minideb.elcforest> Renaud Casenave-P?r? a ?crit : > Hi, > Hi, > I have configured clfswm to launch some software using bindings, and I use > do-shell for that. > It usually works fine (in particular for konsole, emacs, skype...) but for > conkeror, it always hangs after some time and I have no idea why. If I launch it > using konsole (itself launch using do-shell from clfswm), it works fine. > > When run on the command-line, conkeror floods it with warning messages so I > would have guessed it hangs because of a full stream buffer but it also hangs > when run with standard output and standard error redirected to /dev/null so I > am not so sure anymore... If you have some pointers as to where to look to find > the problem, I would be happy to investigate further. > What code do you use to start conkeror exactly. And where have you put it? > On a related note, you added an option to prevent a window from stealing the > focus and it worked for some time but it doesn't anymore... As far as clfswm is > concerned, it seems it doesn't transfer the focus itself (the frame decoration > still show the former window to be in focus) but the keyboard input is > transferred to the new window... I might look into it when I have time, as I > think you don't use this feature yourself it might be better if I try and fix it > myself but I still wanted to let you know. > You're right. I do not use it. I'll have a look as soon I'll have more time. > Thanks, > Philippe From renaud at casenave-pere.fr Sun Dec 8 07:28:10 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Sun, 08 Dec 2013 16:28:10 +0900 Subject: Conkeror hangs when run using do-shell In-Reply-To: <87haal1zi9.fsf@minideb.elcforest> (Philippe Brochard's message of "Fri, 06 Dec 2013 21:43:42 +0100") References: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> <87haal1zi9.fsf@minideb.elcforest> Message-ID: <871u1nu7hx.fsf@zahikel.casenave.fr> Hi, On Sat, Dec 07 2013, Philippe Brochard wrote: > All works as expected here with clisp and sbcl. The code you send is > working for me. I use conkeror every days and I've never seen a hang > up. > > Please can you have a deeper look. And report any problem or suspect > behaviour. You're right? It seems to work properly now. Then I don't know, it was probably a bug within conkeror or xulrunner, or maybe the /dev/null redirection did the trick. Sorry for the noise :/ > The same, all works as expected here with those lines in my .clfsmwrc > > ;-------------------------------------------------- > (setf *steal-focus* nil) > (setf *default-nw-hook* 'leave-focus-frame-nw-hook) > ;-------------------------------------------------- > > Please, can you give use more details on what you expect. With the above settings, it works well when you are running a new application but not if the application is already running and it only open a new tab. The same applies for emacsclient, for example: Run emacs normally and put it in server mode. In a terminal, ask emacs to open a buffer within the open emacs frame: `emacsclient test-file` I don't really know why it behave like this but if you do it that way, X will generate :focus-out / :focus-in events to the emacs frame without clfswm asking it to actually change the focus and only after that X will generate a :configure-request event where *steal-focus* is checked. I have looked around in clfswm source and I came up with a simple patch which should affect only (eq *steal-focus* nil) configurations by storing the currently focused window and by registering a :focus-in event-handler where I check if X did change the focus without clfswm telling it to. ;-------------------------------------------------- diff --git a/src/clfswm.lisp b/src/clfswm.lisp index 3b6545a..919bea2 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -129,6 +129,9 @@ (> root-y (- (screen-height) 3))) (manage-focus window root-x root-y))) +(define-handler main-mode :focus-in (window) + (unless (or *steal-focus* (child-equal-p window (focused-window))) + (focus-window (focused-window)))) (define-handler main-mode :exposure (window) (awhen (find-frame-window window) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 5d8cb0f..7df2560 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -570,15 +570,21 @@ they should be windows. So use this function to make a window out of them." (setf (xlib:window-priority window) :above))) -(defun no-focus () - "don't focus any window but still read keyboard events." - (xlib:set-input-focus *display* *no-focus-window* :pointer-root)) - -(defun focus-window (window) - "Give the window focus." - (no-focus) - (when (xlib:window-p window) - (xlib:set-input-focus *display* window :parent))) +(let ((focused-window nil)) + (defun no-focus () + "don't focus any window but still read keyboard events." + (xlib:set-input-focus *display* *no-focus-window* :pointer-root) + (setf focused-window nil)) + + (defun focus-window (window) + "Give the window focus." + (no-focus) + (when (xlib:window-p window) + (xlib:set-input-focus *display* window :parent) + (setf focused-window window))) + + (defun focused-window () + focused-window)) (defun raise-and-focus-window (window) "Raise and focus." ;-------------------------------------------------- Please tell me if this patch is ok for you. Thanks, -- Renaud Casenave-P?r? From andrea.demichele at gmail.com Tue Dec 3 18:22:31 2013 From: andrea.demichele at gmail.com (Andrea De Michele) Date: Tue, 03 Dec 2013 19:22:31 +0100 Subject: Problem with geogebra Message-ID: <87haapdcbc.fsf@argh.homenet.telecomitalia.it> I use clfswm as my main window manager and I think it is fantastic. Before I used stumpwm. Thank you for the software. Now I have a problem with geogebra, its window is all grey no gadgets (icons, menu, plot-pane, ...). I use arch linux, sbcl, and clfswm version from quicklisp. -- Andrea De Michele From pbrochard at common-lisp.net Fri Dec 13 21:25:44 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 22:25:44 +0100 Subject: Expose mode: strange failures. In-Reply-To: (=?iso-8859-1?Q?=22Micha=EBl?= Cadilhac"'s message of "Sat, 7 Dec 2013 13:39:28 +0100") References: <87ppp92147.fsf@minideb.elcforest> <87lhzxapx5.fsf@minideb.elcforest> Message-ID: <87vbys8muf.fsf@minideb.elcforest> Micha?l Cadilhac writes: > On Sat, Dec 7, 2013 at 11:58 AM, Philippe Brochard > wrote: > >> Micha?l Cadilhac writes: >>> Merci! I still have the random crashes with Expose mode though. > >> Ok, I spot it. I'm trying to solve it. > > Good news! > It's hopefully solved. Many thanks for the report! [...] >>> And two other unrelated things, if I may hijack my own thread: >>> - I modified reorder-brother-simple so that it behaves like >>> reorder-brother when called with (child-root-p (current-child)), that >>> is, (leave-frame) then (enter-frame). I believe this is more >>> consistent and should be done in master. >>> >> Ok. Can you send the patch you want to be applied? > Ok applied in your name. > Sure thing; attached. While I'm at it, I think I'm missing the point > of brother circulation. In Windows, Alt+Tab circulates the windows in > the CLFSWM sense, right? But then, if I stay on Alt and do successive > tabs, this will go through all the windows; it seems that it's not the > case in CLFSWM, is it? Is Alt+Tab just a way to switch between the > two top windows on the stack? > Don't release the alt key like in more standard window manager. >>> - If I wanted to add a system tray to the toolbar, would >>> https://github.com/lucashpandolfo/stumpwm-tray be a good start? >>> >> Yes this is a way. I haven't test it in stumpwm and it seems there is >> some code related to stumpwm (for example (in-package :stumpwm)). >> >> You can also look at some independent systray project. > > I wanted to have the list of child of the current root displayed in > the toolbar (this I think I can easily do using toolbar.lisp) AND have > a systray (for dropbox and tomboy). Would you suggest a mixed > approach relying on both toolbar.lisp and an external systray program? > I think it'll be far more easy with toolbar.lisp since external systray rely on netwm functions (in netwm-util.lisp) and there is some difference of view between clfswm and more common window manager view. > Thanks again Philippe. > Your welcome :-) > M. > Philippe From pbrochard at common-lisp.net Wed Dec 4 14:52:10 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Wed, 04 Dec 2013 15:52:10 +0100 Subject: "Component :CLFSWM not found" in load.lisp. In-Reply-To: (=?iso-8859-1?Q?=22Micha=EBl?= Cadilhac"'s message of "Wed, 4 Dec 2013 00:01:15 +0100") References: Message-ID: <87d2lc8y91.fsf@minideb.elcforest> Micha?l Cadilhac writes: > Hi there everyone; > Hi, > Compilation of CLFSWM fails with the error in the Subject. I tried > installing it through the AUR on Arch Linux, with the latest sbcl > available, though the AUR is not to be blamed as the same error > appears when compiling from source. > > To my very small understanding, it is ASDF who fails to find > clfswm.asd. In any cases, this is solved by adding "." to the ASDF's > search path with, e.g.: > > (push "./" asdf:*central-registry*) > > I'm really not sure which package should be fixed, if any, hence the > report here might not really concern CLFSWM, in which case, sorry for > the noise. > Thanks for the report. It's fixed in the cc7b5ea commit. > Happy hacking, > Thanks. Happy hacking for you too. > Micha?l > Philippe From michael at cadilhac.name Tue Dec 3 23:01:15 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Wed, 4 Dec 2013 00:01:15 +0100 Subject: "Component :CLFSWM not found" in load.lisp. Message-ID: Hi there everyone; Compilation of CLFSWM fails with the error in the Subject. I tried installing it through the AUR on Arch Linux, with the latest sbcl available, though the AUR is not to be blamed as the same error appears when compiling from source. To my very small understanding, it is ASDF who fails to find clfswm.asd. In any cases, this is solved by adding "." to the ASDF's search path with, e.g.: (push "./" asdf:*central-registry*) I'm really not sure which package should be fixed, if any, hence the report here might not really concern CLFSWM, in which case, sorry for the noise. Happy hacking, Micha?l From andrea.demichele at gmail.com Tue Dec 3 20:50:03 2013 From: andrea.demichele at gmail.com (Andrea De Michele) Date: Tue, 03 Dec 2013 21:50:03 +0100 Subject: Problem with geogebra In-Reply-To: (Ales Guzik's message of "Tue, 3 Dec 2013 22:11:12 +0300") References: <87haapdcbc.fsf@argh.homenet.telecomitalia.it> Message-ID: <874n6p4q2s.fsf@argh.homenet.telecomitalia.it> Ciao Ales, Thank you very much, it works adm. Ales Guzik writes: > Hi Andrea, > > Looks like it's a java application. You may try to add the following > line to your .xinitrc: > > export _JAVA_AWT_WM_NONREPARENTING=1 > > It have solved similar problems for me quite a while ago. > > Hope it helps, > Ales > > 03.12.2013 21:23 ???????????? "Andrea De Michele" > ???????: > > I use clfswm as my main window manager and I think it is > fantastic. Before I > used stumpwm. Thank you for the software. > > Now I have a problem with geogebra, its window is all grey no > gadgets > (icons, menu, plot-pane, ...). > > I use arch linux, sbcl, and clfswm version from quicklisp. > > > -- > Andrea De Michele > > -- Andrea De Michele From michael at cadilhac.name Wed Dec 4 21:48:47 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Wed, 4 Dec 2013 22:48:47 +0100 Subject: Expose mode: strange failures. In-Reply-To: References: Message-ID: On Wed, Dec 4, 2013 at 10:43 PM, Micha?l Cadilhac wrote: > Hi there folks, bonjour Philippe; > > So I started to use CLFSWM for real today and I had a few crashes. > The output in xsession-error is rather terse, so if you have a magic > command to enable a more verbose debug, please tell me and I'll > happily make CLFSWM crash again :-). > > The crashes are somewhat related to F10-Expose; I don't know to which > extent they are Expose-specific though. At the following address: > > http://i.imgur.com/hfAKfnE.png > > is a picture of a behavior which does not trigger an error until I > click on the firefox window. As you can see, the text is not > displayed, and the expose mode is only half drawn ( > http://i.imgur.com/NRWuD4a.png shows the expected behavior ). The > error that follows a click on firefox is: > > Processing "New Tab - Mozilla Firefox": type=NORMAL # > Processing "micha at kleene: /dd": type=NORMAL # > CLFSWM Error: The value # > is not of type > CLFSWM::EXPOSE-CHILD.. Similarly, I now have the following error: CLFSWM Error: The value Frame 1 - 0.0 0.0 1.0 1.0 # NIL (NORMAL) NIL NIL T NIL 0 CLICK is not of type CLFSWM::EXPOSE-CHILD.. HTH! M. From michael at cadilhac.name Wed Dec 4 21:43:48 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Wed, 4 Dec 2013 22:43:48 +0100 Subject: Expose mode: strange failures. Message-ID: Hi there folks, bonjour Philippe; So I started to use CLFSWM for real today and I had a few crashes. The output in xsession-error is rather terse, so if you have a magic command to enable a more verbose debug, please tell me and I'll happily make CLFSWM crash again :-). The crashes are somewhat related to F10-Expose; I don't know to which extent they are Expose-specific though. At the following address: http://i.imgur.com/hfAKfnE.png is a picture of a behavior which does not trigger an error until I click on the firefox window. As you can see, the text is not displayed, and the expose mode is only half drawn ( http://i.imgur.com/NRWuD4a.png shows the expected behavior ). The error that follows a click on firefox is: Processing "New Tab - Mozilla Firefox": type=NORMAL # Processing "micha at kleene: /dd": type=NORMAL # CLFSWM Error: The value # is not of type CLFSWM::EXPOSE-CHILD.. A second crash I got came from a window with German words in the title. The reported error was: Processing "genug - W?rterbuch Deutsch-Englisch - WordReference.com - Mozilla Firefox": type=NORMAL # CLFSWM Error: The value #\LATIN_SMALL_LETTER_O_WITH_DIAERESIS is not of type BASE-CHAR.. Reinitializing... ... and from there, it went downhill until a full crash (see attached xsession-error). Sorry if this report is unhelpful, do tell me if there's anything I can test. Happy hacking, Micha?l -------------- next part -------------- A non-text attachment was scrubbed... Name: xsession-diacritics Type: application/octet-stream Size: 73217 bytes Desc: not available URL: From pbrochard at common-lisp.net Fri Dec 13 22:36:19 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 23:36:19 +0100 Subject: Conkeror hangs when run using do-shell In-Reply-To: <871u1nu7hx.fsf@zahikel.casenave.fr> ("Renaud \=\?iso-8859-1\?Q\?Casenave-P\=E9r\=E9\=22's\?\= message of "Sun, 08 Dec 2013 16:28:10 +0900") References: <87mwkk3ryv.fsf@sandalphon.casenave-pere.fr> <87haal1zi9.fsf@minideb.elcforest> <871u1nu7hx.fsf@zahikel.casenave.fr> Message-ID: <87mwk48jks.fsf@minideb.elcforest> Renaud Casenave-P?r? a ?crit : > Hi, > > On Sat, Dec 07 2013, Philippe Brochard wrote: > >> All works as expected here with clisp and sbcl. The code you send is >> working for me. I use conkeror every days and I've never seen a hang >> up. >> >> Please can you have a deeper look. And report any problem or suspect >> behaviour. > > You're right? It seems to work properly now. Then I don't know, it was probably > a bug within conkeror or xulrunner, or maybe the /dev/null redirection did the > trick. Sorry for the noise :/ > No problem, I prefer too much noise instead of hidden bugs. >> The same, all works as expected here with those lines in my .clfsmwrc >> >> ;-------------------------------------------------- >> (setf *steal-focus* nil) >> (setf *default-nw-hook* 'leave-focus-frame-nw-hook) >> ;-------------------------------------------------- >> >> Please, can you give use more details on what you expect. > > With the above settings, it works well when you are running a new application > but not if the application is already running and it only open a new tab. The > same applies for emacsclient, for example: > > Run emacs normally and put it in server mode. > In a terminal, ask emacs to open a buffer within the open emacs frame: > `emacsclient test-file` > > I don't really know why it behave like this but if you do it that way, X will > generate :focus-out / :focus-in events to the emacs frame without clfswm asking > it to actually change the focus and only after that X will generate a > :configure-request event where *steal-focus* is checked. > > I have looked around in clfswm source and I came up with a simple patch which > should affect only (eq *steal-focus* nil) configurations by storing the > currently focused window and by registering a :focus-in event-handler where I > check if X did change the focus without clfswm telling it to. [...] > Please tell me if this patch is ok for you. > Your patch is ok and applied in your name. I've removed the *steal-focus* part since emacs have not to steal the focus when it's not on the same frame as the focused child. (Maybe I'll rethink this part latter). > Thanks, > Thanks for your report. Regards, Philippe From michael at cadilhac.name Sat Dec 7 12:39:28 2013 From: michael at cadilhac.name (=?ISO-8859-1?Q?Micha=EBl_Cadilhac?=) Date: Sat, 7 Dec 2013 13:39:28 +0100 Subject: Expose mode: strange failures. In-Reply-To: <87lhzxapx5.fsf@minideb.elcforest> References: <87ppp92147.fsf@minideb.elcforest> <87lhzxapx5.fsf@minideb.elcforest> Message-ID: On Sat, Dec 7, 2013 at 11:58 AM, Philippe Brochard wrote: > Micha?l Cadilhac writes: >> Merci! I still have the random crashes with Expose mode though. > Ok, I spot it. I'm trying to solve it. Good news! > For your request for a backtrace. You have to use the main-unprotected > function. Start a lisp, load clfswm with asdf and then start clfswm with > main-unprotected instead of main. Will do, thanks! >> And two other unrelated things, if I may hijack my own thread: >> - I modified reorder-brother-simple so that it behaves like >> reorder-brother when called with (child-root-p (current-child)), that >> is, (leave-frame) then (enter-frame). I believe this is more >> consistent and should be done in master. >> > Ok. Can you send the patch you want to be applied? Sure thing; attached. While I'm at it, I think I'm missing the point of brother circulation. In Windows, Alt+Tab circulates the windows in the CLFSWM sense, right? But then, if I stay on Alt and do successive tabs, this will go through all the windows; it seems that it's not the case in CLFSWM, is it? Is Alt+Tab just a way to switch between the two top windows on the stack? >> - If I wanted to add a system tray to the toolbar, would >> https://github.com/lucashpandolfo/stumpwm-tray be a good start? >> > Yes this is a way. I haven't test it in stumpwm and it seems there is > some code related to stumpwm (for example (in-package :stumpwm)). > > You can also look at some independent systray project. I wanted to have the list of child of the current root displayed in the toolbar (this I think I can easily do using toolbar.lisp) AND have a systray (for dropbox and tomboy). Would you suggest a mixed approach relying on both toolbar.lisp and an external systray program? Thanks again Philippe. M. -------------- next part -------------- diff --git a/src/clfswm-circulate-mode.lisp b/src/clfswm-circulate-mode.lisp index 8f1a1bd..957684a 100644 --- a/src/clfswm-circulate-mode.lisp +++ b/src/clfswm-circulate-mode.lisp @@ -312,7 +312,10 @@ (defun reorder-brother-simple (reorder-fun) - (unless (child-root-p (current-child)) + (let ((is-root-p (child-root-p (current-child)))) + (when is-root-p + (leave-frame) + (sleep *spatial-move-delay-before*)) (no-focus) (select-current-frame nil) (let ((parent-frame (find-parent-frame (current-child)))) @@ -320,7 +323,10 @@ (with-slots (child) parent-frame (setf child (funcall reorder-fun child) (current-child) (frame-selected-child parent-frame)))) - (show-all-children t)))) + (show-all-children t) + (when is-root-p + (sleep *spatial-move-delay-after*) + (enter-frame))))) (defun select-next-brother-simple ()