[Done] Touchpad scrolling issues in XP

Just starting out? Need help? Post your questions and find answers here.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

[Done] Touchpad scrolling issues in XP

Post 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.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

So... whats the bug ?
quidquid Latine dictum sit altum videtur
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Is there any word on this issue? It does not affect the PureBasic for Linux IDE. Only the Windows one.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Unfortunately, WM_VSCROLL seems to be correctly handled by scintilla. Could you check the issue with a simple ScintillaGadget() on a window ?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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).
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 ?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.
quidquid Latine dictum sit altum videtur
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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?
Post Reply