darcs patch: PerWindowKbdLayout

Mon Mar 29 20:54:33 EDT 2010 konstantin.sobolev@gmail.com * PerWindowKbdLayout

* On Monday, March 29 2010, konstantin.sobolev@gmail.com wrote:
Mon Mar 29 20:54:33 EDT 2010 konstantin.sobolev@gmail.com * PerWindowKbdLayout
Hello Konstantin, Does this patch still have warnings with ghc-6.12 with respect to the #include, (that it no longer has any effect, though hsc2hs needs it, as there seems to be no good way to pass it the appropriate --include flag) or did you address that? -- Adam

On Mon, Mar 29, 2010 at 9:36 PM, Adam Vogt
* On Monday, March 29 2010, konstantin.sobolev@gmail.com wrote:
Mon Mar 29 20:54:33 EDT 2010 konstantin.sobolev@gmail.com * PerWindowKbdLayout
Hello Konstantin,
Does this patch still have warnings with ghc-6.12 with respect to the #include, (that it no longer has any effect, though hsc2hs needs it, as there seems to be no good way to pass it the appropriate --include flag) or did you address that?
Still has problems with #include on 6.12. I don't know how to get rid of it, sorry.

Does this patch still have warnings with ghc-6.12 with respect to the #include, (that it no longer has any effect, though hsc2hs needs it, as there seems to be no good way to pass it the appropriate --include flag) or did you address that?
Still has problems with #include on 6.12. I don't know how to get rid of it, sorry.
Just tried under 6.12.1 - and xmonad-contrib builds cleanly with it! However, if I try to run hsc2hs and then ghc on this file separately - then yes, the warning is there, together with 2 other warnins about discarded do-notation statements that don't even exist in my source: /usr/local/bin/ghc -Wall -c PerWindowKbdLayout.hs PerWindowKbdLayout.hs:1:11: Warning: -#include is deprecated: No longer has any effect PerWindowKbdLayout.hsc:109:4: Warning: A do-notation statement discarded a result of type CInt. Suppress this warning by saying "_ <- xkbGetState d (256) stRecPtr", or by using the flag -fno-warn-unused-do-bind PerWindowKbdLayout.hsc:126:4: Warning: A do-notation statement discarded a result of type Maybe (). Suppress this warning by saying "_ <- ($) traverse update fmap W.focus mst", or by using the flag -fno-warn-unused-do-bind Which makes me think that running ghc on this file separately like this isn't valid. If this is really important, {-# OPTIONS_GHC -fno-warn-deprecated-flags #-} removes the #include warning.

* On Monday, April 26 2010, Konstantin Sobolev wrote:
Hi all,
On Tue, Mar 30, 2010 at 4:55 AM,
wrote: * PerWindowKbdLayout
What is the status of this patch? Can I improve something to get it accepted?
One consideration is that a missing XKBlib.h can stop you from building contrib, but I'm not sure that using the C preprocessor to remove those imports when the header is missing is much better. See the X11 library: Graphics/X11/ExtraTypes/XF86.hsc On the other hand, XKBlib.h is supposedly in the libx11-dev package (for debian/ubuntu), so users who can build the X11 binding, will be able to build contrib. That leaves only users who use their distro backage for haskell-X11, but want to build contrib themselves (ex. from darcs) with issues. I'd like to have a second opinion on these possible issues (perhaps I'm making an issue where there is none) before pushing to contrib. So if you want your PerWindowKbdLayout.hsc somewhere accessible in the meantime, perhaps it could go into http://code.haskell.org/xmonad-extras/ -- Adam

On Tue, Mar 30, 2010 at 4:55 AM,
wrote: * PerWindowKbdLayout
What is the status of this patch? Can I improve something to get it accepted?
One consideration is that a missing XKBlib.h can stop you from building contrib, but I'm not sure that using the C preprocessor to remove those imports when the header is missing is much better. See the X11 library:
Graphics/X11/ExtraTypes/XF86.hsc
On the other hand, XKBlib.h is supposedly in the libx11-dev package (for debian/ubuntu), so users who can build the X11 binding, will be able to build contrib. That leaves only users who use their distro backage for haskell-X11, but want to build contrib themselves (ex. from darcs) with issues.
I'd like to have a second opinion on these possible issues (perhaps I'm making an issue where there is none) before pushing to contrib.
So if you want your PerWindowKbdLayout.hsc somewhere accessible in the meantime, perhaps it could go into http://code.haskell.org/xmonad-extras/
OK, will submit to extras since there's no movement here. Thanks

It doesn't work for me. I'm getting my keyboard layout reset to default one
after every focus change.
On Tue, Mar 30, 2010 at 04:55,
Mon Mar 29 20:54:33 EDT 2010 konstantin.sobolev@gmail.com * PerWindowKbdLayout
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
participants (4)
-
Adam Vogt
-
Konstantin Sobolev
-
konstantin.sobolev@gmail.com
-
Sergey Alirzaev