I have updated the plugin url in the original post to be a stripped down test so that it's easier to verify.
My next test will be in Windows 7 as soon as I have a fresh install of it, since currently I am using Wine in Fedora. But other people on Aardwolf already tell me that they also see the whole miniwindow turning blue, so I doubt I'll see other than what is demonstrated in the video.
[EDIT]Actually, I can just put the code here so we don't have to rely on pastebin.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="Resize_Test"
author="Fiendish"
id="7d0a741a84e89b3b7fe9a09a"
language="Lua"
purpose="Resize Bug Tester"
requires="4.73"
save_state="y"
>
</plugin>
<script>
<![CDATA[
require "movewindow"
default_x = 468
default_y = 236
height = 215
width = 269
lastRefresh = 0
function ResizeMoveCallback()
width = math.max(math.min(WindowInfo(win, 17)+offsetx, GetInfo(281)-windowinfo.window_left), 50)
height = math.max(math.min(WindowInfo(win, 18)+offsety, GetInfo(280)-windowinfo.window_top), 50)
if (utils.timer() - lastRefresh > 0.1) then -- don't choke on very slow machines
-- !!!THE BLUE DISPLAY BUG HAPPENS HERE BECAUSE WINDOWRESIZE IS CALLED INSIDE A DRAG HANDLER!!!
WindowResize(win, width, height, 0xFF0000)
WindowMoveHotspot(win, "resize", width-10, height-10, width, height)
Redraw()
lastRefresh = utils.timer()
end
end
function ResizeReleaseCallback()
SetUpHotspotsAndDraw()
end
function SetUpHotspotsAndDraw()
WindowCreate (win, windowinfo.window_left, windowinfo.window_top, width, height, windowinfo.window_mode, windowinfo.window_flags, 0x000000)
movewindow.add_drag_handler (win, 0, 0, 0, 0)
-- Add handler for resizing
WindowAddHotspot(win, "resize", width-10, height-10, width, height, "MouseOver", "", "MouseDown", "", "", "", 6, 0)
WindowDragHandler(win, "resize", "ResizeMoveCallback", "ResizeReleaseCallback", 0)
WindowShow (win, true)
-- draw the resize widget bottom right corner
WindowLine(win, width-3, height-1, width-1, height-3, 0xffffff, 0, 1)
WindowLine(win, width-5, height-1, width-1, height-5, 0x696969, 0, 2)
WindowLine(win, width-6, height-1, width-1, height-6, 0xffffff, 0, 1)
WindowLine(win, width-8, height-1, width-1, height-8, 0x696969, 0, 2)
WindowLine(win, width-9, height-1, width-1, height-9, 0xffffff, 0, 1)
WindowLine(win, width-11, height-1, width-1, height-11, 0x696969, 0, 2)
WindowLine(win, width-12, height-1, width-1, height-12, 0xffffff, 0, 1)
WindowLine(win, width-14, height-1, width-1, height-14, 0x696969, 0, 1)
-- draw edge frame
WindowRectOp (win, 1, 0, 0, 0, 0, 0xdddddd, 15)
Redraw()
end
function MouseDown(flags, hotspot_id)
if (hotspot_id == "resize") then
offsetx = width-WindowInfo(win, 17)
offsety = height-WindowInfo(win, 18)
end
end
function OnPluginClose ()
WindowDelete(win)
end
function OnPluginInstall()
win = GetPluginID()
WindowCreate (win, default_x, default_y, 200, 200, 0, miniwin.create_absolute_location, 0x000000)
--- install the window movement handler, get back the window position.
windowinfo = movewindow.install (win, miniwin.pos_center, miniwin.create_absolute_location, false, nil,nil,{x=default_x, y=default_y})
-- Draw the initial group window
SetUpHotspotsAndDraw()
end
]]>
</script>
</muclient>
|