Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting default language for prev_layout #12

Closed
imposeren opened this issue Sep 21, 2011 · 6 comments
Closed

Setting default language for prev_layout #12

imposeren opened this issue Sep 21, 2011 · 6 comments
Assignees
Labels

Comments

@imposeren
Copy link

It will be great if new windows had "previous layout" set by default for some value.

This will allow to use "group ring" easier.

Maybe just seting previous language to second layout by default would be fine

@qnikst
Copy link
Owner

qnikst commented Sep 21, 2011

will do

@ghost ghost assigned qnikst Sep 21, 2011
@imposeren
Copy link
Author

dirty hack for version 0.5:

--- a/src/perwindow.c
+++ b/src/perwindow.c
@@ -84,7 +84,7 @@ _kbdd_perwindow_get_prev(WINDOW_TYPE win)
         group = (GROUP_TYPE)((GPOINTER_TO_UINT(value)>>8) & 0xFF );
     }
     else
-        group = 0;
+        group = 1;
     return group;
 }

@imposeren
Copy link
Author

this "fix" works just sometimes. And also causes unexpected behaviour

@imposeren
Copy link
Author

I think this solution is better but also may have bugs:

diff --git a/src/perwindow.c b/src/perwindow.c
index 7921d58..9c5147c 100644
--- a/src/perwindow.c
+++ b/src/perwindow.c
@@ -85,6 +85,10 @@ _kbdd_perwindow_get_prev(WINDOW_TYPE win)
     }
     else
         group = 0;
+       if ( _kbdd_perwindow_get(win) == group)
+       {
+               group++;
+       }
     return group;
 }

@qnikst
Copy link
Owner

qnikst commented Sep 23, 2011

Thanks for you comments.
But I've implemented it in different aproach.

This updates can be tested in 0.5.1

Bug will be opened until I'll fix it in 0.6

@qnikst qnikst closed this as completed Sep 23, 2011
@qnikst
Copy link
Owner

qnikst commented Sep 23, 2011

Fixed also in 0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants