This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via ed115929f3da52f494f3ff98a16a56f7dc5a3dd0 (commit)
from 5455a585dc86cebd666ea41499519ea18e6172f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/ed115929f3da52f494f3ff98a16a56f7dc5a3dd0
commit ed115929f3da52f494f3ff98a16a56f7dc5a3dd0
Author: Carlos R. Mafra <[email protected]>
Date: Fri Jun 7 14:32:07 2013 +0100
Fix workspace renaming with Ctrl+left click
The Workspaces entry in the main menu allows to rename workspaces by
clicking on the workspace name while pressing the Ctrl key.
However since commit 63219247c6c7 ("Added shortcut to switch to last used
workspace")
there is one more entry before the workspace name list, and that leads to
picking a wrong name to rename -- clicking on the first workspace asks to
rename the second workspace and so forth. Trying to rename the last
workspace
leads to a segfault.
This happens because there is an explicit offset in the current code (- 2)
to account for the "non-workspace" entries in the menu. If one adds one
more entry that offset should be changed too (this is a prime example
of fragile code leading to bugs).
diff --git a/src/menu.c b/src/menu.c
index 337b9e3..c250fa4 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1766,7 +1766,7 @@ static void menuMouseDown(WObjDescriptor * desc, XEvent *
event)
if (!close_on_exit && (bev->state & ControlMask) && smenu &&
entry->flags.editable) {
char buffer[128];
char *name;
- int number = entry_no - 2; /* Entries "New" and
"Destroy Last" appear before workspaces */
+ int number = entry_no - 3; /* Entries "New", "Destroy
Last" and "Last Used" appear before workspaces */
name = wstrdup(scr->workspaces[number]->name);
snprintf(buffer, sizeof(buffer), _("Type the name for
workspace %i:"), number + 1);
-----------------------------------------------------------------------
Summary of changes:
src/menu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].