Advertisement
Guest User

synergy patch

a guest
Dec 11th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.92 KB | None | 0 0
  1. diff -ur synergy-1.6.3-final/src/gui/src/CommandProcess.h synergy-1.6.3-final_/src/gui/src/CommandProcess.h
  2. --- synergy-1.6.3-final/src/gui/src/CommandProcess.h    2015-01-05 16:32:58.000000000 +0300
  3. +++ synergy-1.6.3-final_/src/gui/src/CommandProcess.h   2015-10-24 19:26:32.528391860 +0300
  4. @@ -109,23 +109,25 @@
  5.  
  6.     // check for hotkey events
  7.     Event::Type type = event.getType();
  8. -   if (type == m_events->forIPrimaryScreen().hotKeyDown()) {
  9. +    if (type == 9 || type == m_events->forIPrimaryScreen().hotKeyDown()) {
  10.         status = kActivate;
  11.     }
  12. -   else if (type == m_events->forIPrimaryScreen().hotKeyUp()) {
  13. +    else if (type == 10 || type == m_events->forIPrimaryScreen().hotKeyUp()) {
  14.         status = kDeactivate;
  15.     }
  16.     else {
  17. -       return kNoMatch;
  18. +        status = kNoMatch;
  19.     }
  20.  
  21.     // check if it's our hotkey
  22.     IPrimaryScreen::HotKeyInfo* kinfo =
  23.         reinterpret_cast<IPlatformScreen::HotKeyInfo*>(event.getData());
  24. -   if (kinfo->m_id != m_id) {
  25. +    if (kinfo->m_id != m_id && !(m_id == 1 && kinfo->m_id == 61204)) {
  26. +        LOG((CLOG_DEBUG1 "kinfo->m_id != m_id (%d != %d)", kinfo->m_id, m_id));
  27.         return kNoMatch;
  28.     }
  29.  
  30. +    LOG((CLOG_DEBUG1 "event_type %d matches %d", type, status));
  31.     return status;
  32.  }
  33.  
  34. @@ -797,6 +801,7 @@
  35.     switch (m_condition->match(event)) {
  36.     default:
  37.         // not handled
  38. +        LOG((CLOG_DEBUG2 "not handled"));
  39.         return false;
  40.  
  41.     case kActivate:
  42. @@ -1079,12 +1084,16 @@
  43.     // let each rule try to match the event until one does
  44.     for (RuleList::iterator rule  = m_ruleList.begin();
  45.                              rule != m_ruleList.end(); ++rule) {
  46. +        LOG((CLOG_DEBUG2 "rule %s enabled = %d", rule->format().c_str(), rule->enabled));
  47.         if (rule->handleEvent(myEvent)) {
  48.             // handled
  49. +            LOG((CLOG_DEBUG2 "rule %s maches", rule->format().c_str()));
  50.             return;
  51.         }
  52.     }
  53.  
  54. +    LOG((CLOG_DEBUG2 "no rule maches"));
  55. +
  56.     // not handled so pass through
  57.     m_events->addEvent(myEvent);
  58.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement