Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 06-13-2019, 06:13 AM   #1
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,450
Default reaper.SetMouseModifier not responding immediately (specific use case)

I'm trying to trigger it with mouse click, it gets set, atleast GetMouseModifier after Set is returning different value. But it does not change the action (in my case I am setting it to do nothing) until the next mouse click.


Code:
if mouse.l_click then -- WAIT FOR CLICK
    local track_info = GetTrackZoneInfo() -- GET TRIGGER INFO
    if track_info == "AS_ZONE" then 
      mouse.modifier = reaper.GetMouseModifier( "MM_CTX_ITEMEDGE", 0, "") -- STORE PREVIOUS MODIFIER
      reaper.SetMouseModifier( "MM_CTX_ITEMEDGE", 0, 0) -- SET MODIFIER TO NOTHING
    end
  end

  if mouse.modifier then  
    if mouse.l_up   then reaper.SetMouseModifier( "MM_CTX_ITEMEDGE", 0, mouse.modifier) mouse.modifier = nil end -- RESTORE MODIFIER ON MOUSE UP
  end
I'm using JS_API to get mouse events. Maybe its not a bug but a design but IDK
Sexan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.