Mercurial > pidgin
diff console/libgnt/test/keys.c @ 14310:a766441af5ea
[gaim-migrate @ 17000]
Add support for mouse. Currently you can:
- click on the taskbar to bring a window on top
- click on the topmost line of the *active* window and drag+drop to move the window.
This is disabled by default. You can enable it by setting "mouse = 1" in ~/.gntrc.
If you enable mouse support, then do shift+click to get the usual behaviours
(eg. shift+middleclick to paste etc.)
committer: Tailor Script <tailor@pidgin.im>
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Wed, 23 Aug 2006 12:29:08 +0000 |
| parents | 5300e2f1fed3 |
| children |
line wrap: on
line diff
--- a/console/libgnt/test/keys.c Wed Aug 23 10:48:21 2006 +0000 +++ b/console/libgnt/test/keys.c Wed Aug 23 12:29:08 2006 +0000 @@ -10,7 +10,25 @@ gnt_entry_set_text(entry, s); g_free(s); if (text[0] == 27) - return FALSE; + { + if (strncmp(text + 1, "[M ", 3) == 0) + { + int x = (unsigned)text[4]; + int y = (unsigned)text[5]; + if (x < 0) x += 256; + if (y < 0) y += 256; + x -= 33; + y -= 33; + s = g_strdup_printf("ldown %d %d", x, y); + gnt_entry_set_text(entry, s); + g_free(s); + } + else if (strncmp(text + 1, "[M#", 3) == 0) + gnt_entry_set_text(entry, "up"); + else + return FALSE; + return TRUE; + } else return TRUE; }
