Page 1 of 2

[Done] Touchpad scrolling issues in XP

Posted: Fri Aug 01, 2008 2:57 am
by Mistrel
This is the same bug I reported two months ago while running PureBasic on my notebook with Vista. I experience the same problem under Windows XP and only in PureBasic.

I also use Notepad++ which uses Scintilla and does not experience this issue.

My notebook uses the "Alps Pointing-Device" driver for the touchpad.

Posted: Fri Aug 01, 2008 3:37 am
by freak
So... whats the bug ?

Posted: Fri Aug 01, 2008 4:35 am
by Mistrel
Sorry. I forgot to link the other post.

http://www.purebasic.fr/english/viewtopic.php?t=32251

The problem is that the touchpad scroll area does not work on tabs other than the first one when the mouse cursor is within the code area. Scrolling works fine when the cursor is on the tabs, the scroll bar, or anywhere else when a tab other than the first is active, but not in the code area.

Posted: Fri Aug 01, 2008 6:41 pm
by Mistrel
I just noticed something strange. If I sort another source to the front of the tab list it still doesn't scroll. Only the tab that was initially first scrolls, even though it is no longer at the front of the list.

Posted: Sun Aug 31, 2008 10:49 pm
by Mistrel
Is there any word on this issue? It does not affect the PureBasic for Linux IDE. Only the Windows one.

Posted: Wed Sep 17, 2008 7:13 pm
by Mistrel
I found the source of the problem. My desktop which uses a real mouse sends WM_MOUSEWHEEL messages while my notebook sends WM_VSCROLL with its virtual scrollwheel. I'm assuming that this is not handled correctly by the IDE.

I also noticed that I can scroll in the other tabs only if the first tab does not have a scrollbar.

Posted: Sun Sep 21, 2008 1:44 am
by Fred
Unfortunately, WM_VSCROLL seems to be correctly handled by scintilla. Could you check the issue with a simple ScintillaGadget() on a window ?

Posted: Sun Sep 21, 2008 10:24 pm
by Mistrel
Yes, scrolling works fine in a scintilla gadget. It also works fine in Notepad++ tabs (which also use scintilla). The problem is that it doesn't work in the PureBasic IDE on any tab other than the first (unless it's moved).

Posted: Mon Sep 22, 2008 12:22 pm
by Fred
Sorry to be a pain, but could you try to create a window with a panelgadget() and one scintillagadget() on it and see if it works when switching of panel ?

Posted: Mon Sep 22, 2008 11:23 pm
by Mistrel
Scrolling works fine with a Scintilla gadget inside of a panel. But this is not an accurate comparison. In the IDE the tab that the Scintilla gadget is first visible in always scrolls fine. It's in all other tabs where it doesn't work.

What does the IDE do to display the same Scintilla gadget across multiple tabs? I need to test that.

Posted: Mon Sep 22, 2008 11:48 pm
by freak
The IDE does not put the Scintilla on the panel, the panel is only above.
Instead it shows/hides the correct Scintilla when the tab changes.

Posted: Tue Sep 23, 2008 1:04 am
by Mistrel
Here is a list of behavior:

Scrolling works fine in other tabs only if the first tab does not have a vertical scrollbar (the code is very short).

When the first tab has a scrollbar the other tabs will not respond to vertical scrolling when the mouse is inside the Scintilla gadget-- but it WILL scroll if the mouse is within the PureBasic window and not within the bounds of the Scintilla gadget.

The tab that always scrolls is first in the list unless it is moved to another position. But it is always the first tab (not necessarily the tab in the first position) that works.

Posted: Thu Oct 02, 2008 8:36 am
by Mistrel
I tried this on another notebook which sends WM_SCROLLWHEEL and this is not a problem. It's only an issue with the WM_VSCROLL message.

Posted: Thu Oct 30, 2008 6:39 pm
by Mistrel
I've found that messages are being received by PureBasic but are being swallowed by the first Scintilla gadget that has a scrollbar. If the first gadget has no scrollbar but the second two do then only the second gadget will scroll. If you try scrolling in any of the first or the third gadget only the second gadget will scroll (even if it's not visible).

I don't know what the PureBasic IDE is doing differently but I can't reproduce this by hiding/unhiding or changing which gadget is in the foreground.

The example I wrote to test works fine.

Code: Select all

Procedure ScintillaCallBack(Gadget, *scinotify.SCNotification)
EndProcedure

InitScintilla("Scintilla.dll")

OpenWindow(0,0,0,320,240,"")
CreateGadgetList(WindowID(0))
PanelID=PanelGadget(#PB_Any,0,0,320,240)
	AddGadgetItem(PanelID, -1, "Panel 1")
	ScintillaID1=ScintillaGadget(#PB_Any,0,0,300,200,@ScintillaCallBack())
	AddGadgetItem(PanelID, -1, "Panel 2")
	ScintillaID2=ScintillaGadget(#PB_Any,0,0,300,200,@ScintillaCallBack())
CloseGadgetList()

; HideGadget(ScintillaID2,1)
Repeat
	Select EventGadget()
		Case PanelID
			Select EventType()
				Case #PB_EventType_LeftClick
					Select GetGadgetState(PanelID)
						Case 0 ; panel 0
; 							HideGadget(ScintillaID1,0)
; 							HideGadget(ScintillaID2,1)
								SetForegroundWindow_(GadgetID(ScintillaID1))
						Case 1 ; panel 1
; 							HideGadget(ScintillaID2,0)
; 							HideGadget(ScintillaID1,1)
								SetForegroundWindow_(GadgetID(ScintillaID2))
					EndSelect
			EndSelect
	EndSelect
Until WaitWindowEvent()=#WM_CLOSE

Posted: Thu Nov 13, 2008 6:57 pm
by Mistrel
Testing the IDE cross-platform on the same notebook (Vista/XP/Fedora/OSX 10.5.5), scrolling works fine everywhere but in XP/Vista.

I can't produce this problem by setting up similar gadgets. What is the PureBasic IDE doing that's different?