Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Question for the linux devs

  1. #1
    Raw Wave
    Auto Apps:loading...
    justchat_1's Avatar
    Join Date
    Jul 2008
    Location
    Boston, Ma or NY,NY
    Posts
    1,783

    Question for the linux devs

    Are there any significant differences between how linux paints a window and how windows paints a window??

    Having an awful bug with software designed for .net and running on linux which doesn't seem to be an issue with mono. The screen will not repaint until a mouse click happens. After that, the entire repaint queue runs perfectly.

  2. #2
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    Quote Originally Posted by justchat_1 View Post
    Are there any significant differences between how linux paints a window and how windows paints a window??

    Having an awful bug with software designed for .net and running on linux which doesn't seem to be an issue with mono. The screen will not repaint until a mouse click happens. After that, the entire repaint queue runs perfectly.
    So it works in mono but doesn't work in .net? On X11, windows can get the "expose" event which will tell the window to redraw when a portion of the window has been exposed (usually when another window draws itself on top). My guess is mono implements this for whatever graphics api you are using and .net doesn't?

    I'm no expert in Windows programming, but I always found it annoying that Windows never seems to correctly grab events unless the window has focus. A simple example of this annoyance is in X11/Linux, I can have one window with focus, move the mouse to a window that doesn't have focus, scroll the mouse wheel and the window under the window gets the mouse event-- even though it doesn't have focus. Try that on Windows and you'll see that you must first click on the window to give it focus before you can do any other mouse events.

    Last time I checked, this is the behavior in XP, Vista and now 7.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  3. #3
    FLAC
    Join Date
    May 2006
    Location
    Calgary, Alberta
    Posts
    1,718
    Quote Originally Posted by kev000 View Post
    A simple example of this annoyance is in X11/Linux, I can have one window with focus, move the mouse to a window that doesn't have focus, scroll the mouse wheel and the window under the window gets the mouse event-- even though it doesn't have focus. Try that on Windows and you'll see that you must first click on the window to give it focus before you can do any other mouse events.
    YES! YES! YES! Annoys the craaaaaaaaaaaaaap out of me.
    Ampie Case
    2.5" Hard Drive 80GB Samsung 5400RPM
    256 MB DDR2 PC5400
    Xenarc 700TSV - VGA Monitor
    Intel D945GCLF Motherboard
    M2-ATX-HV

    2005 Honda Civic

  4. #4
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,619
    Quote Originally Posted by kev000 View Post

    I'm no expert in Windows programming, but I always found it annoying that Windows never seems to correctly grab events unless the window has focus. A simple example of this annoyance is in X11/Linux, I can have one window with focus, move the mouse to a window that doesn't have focus, scroll the mouse wheel and the window under the window gets the mouse event-- even though it doesn't have focus. Try that on Windows and you'll see that you must first click on the window to give it focus before you can do any other mouse events.

    Last time I checked, this is the behavior in XP, Vista and now 7.

    It's called hand holding, so you don't accidently click or do anything on a window you don't want to.


    Bugs me too. (except when I have clicked in that wrong place and not deleted something important)

  5. #5
    Raw Wave
    Auto Apps:loading...
    justchat_1's Avatar
    Join Date
    Jul 2008
    Location
    Boston, Ma or NY,NY
    Posts
    1,783
    Quote Originally Posted by kev000 View Post
    So it works in mono but doesn't work in .net? On X11, windows can get the "expose" event which will tell the window to redraw when a portion of the window has been exposed (usually when another window draws itself on top). My guess is mono implements this for whatever graphics api you are using and .net doesn't?

    I'm no expert in Windows programming, but I always found it annoying that Windows never seems to correctly grab events unless the window has focus. A simple example of this annoyance is in X11/Linux, I can have one window with focus, move the mouse to a window that doesn't have focus, scroll the mouse wheel and the window under the window gets the mouse event-- even though it doesn't have focus. Try that on Windows and you'll see that you must first click on the window to give it focus before you can do any other mouse events.

    Last time I checked, this is the behavior in XP, Vista and now 7.
    I really should have worded that better. I meant it works in .Net but not in mono, and there aren't any bugs listed in mono's bug tracker for any of the calls used. I guess Expose is the Linux equivalent of WM_PAINT?

    It's an interesting point about the window focus thing....I see it as a wash to be honest. For as many times as its annoying to change focus, its just as annoying to be scrolling, have your mouse pointer leave the window, and then not be scrolling anymore.

    *EDIT* I think i found a workaround....it was something to do with GDI/Cairo's handling of threading. I think .Net has a message queue thread where as Mono runs it on the main thread. I moved the redraw requests to a separate thread and it seems to be working on both platforms now. Still have no idea why a mouse click would have the same effect though...

  6. #6
    Raw Wave
    Auto Apps:loading...
    justchat_1's Avatar
    Join Date
    Jul 2008
    Location
    Boston, Ma or NY,NY
    Posts
    1,783
    While i have all this anti-windows sentiment in one place. I need to do some platform specific calls. Any recommendations on Audio (mainly volume control)? I was thinking of doing the audio player using gstreamer, which I imagine would allow volume control of the playing stream but an OS wide volume adjustment would probably be better. Also, being able to hook volume change notifications would be great. Any chance thats a system signal or dbus notification?

    Actually on second thought, g streamer has .net bindings but I imagine other audio players do too. Would I be better with something else?

  7. #7
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    Quote Originally Posted by justchat_1 View Post
    While i have all this anti-windows sentiment in one place. I need to do some platform specific calls. Any recommendations on Audio (mainly volume control)? I was thinking of doing the audio player using gstreamer, which I imagine would allow volume control of the playing stream but an OS wide volume adjustment would probably be better. Also, being able to hook volume change notifications would be great. Any chance thats a system signal or dbus notification?

    Actually on second thought, g streamer has .net bindings but I imagine other audio players do too. Would I be better with something else?
    phonon would be a better bet because it uses the native DirectSound stuff on Windows. But i don't know if phonon has any c# bindings. A quick google search for "phonon c# bindings" does lead me to believe that there are, but I've never used them.

    On the other hand, I have no idea what gstreamer on windows uses. I'm not sure either can adjust the entire system volume.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  8. #8
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    Quote Originally Posted by justchat_1 View Post
    It's an interesting point about the window focus thing....I see it as a wash to be honest. For as many times as its annoying to change focus, its just as annoying to be scrolling, have your mouse pointer leave the window, and then not be scrolling anymore..
    I don't have any current annoyances with that. I vaguely remember being annoyed with that when I switch to Linux a few years ago. Now I'm in the habit of putting my mouse over whatever I want to scroll. IMHO, it's the right way to go: Moving mouse over object to scroll takes less effort than to move mouse and then click. Meh, it's funny to see what habits your OS forces you into.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  9. #9
    Raw Wave
    Auto Apps:loading...
    justchat_1's Avatar
    Join Date
    Jul 2008
    Location
    Boston, Ma or NY,NY
    Posts
    1,783
    Well this is a linux/Mac thing only......On windows I use a custom directshow player.

    I was pretty sure Phonon used either gstreamer or xine and was just a qt wrapper for them? But then again I tend to skim things....

    While i'm at it I should mention the other item i'm looking for. Whats the best way to directly interact with a mouse under linux (I know i'll have to do a c# wrapper myself and thats ok). I need to be able to track mouse positions independently for multiple mice. I know on windows the mouse move notifications are not mouse specific so a low level hook is needed. I imagine linux is the same way but I would certainly be happy to be wrong.

  10. #10
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    phonon is an media framework abastraction api. On mac it'll use quicktime, on linux, gstreamer or xine, and windows using directshow. If you are just targeting max/linux, either phonon or gstreamer should work fine.

    I thought .NET had built in calls to handle mouse position and stuff. You can always look into GDK# which should work on all 3 platforms (comes with GTK#). It's a wrapper for all the x11 stuff.

    Whatever toolkit you are using should have calls to get that stuff.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1158
    Last Post: 04-06-2011, 10:38 AM
  2. Linux help needed - make fun of the N00b
    By Bugbyte in forum Linux
    Replies: 117
    Last Post: 11-12-2009, 07:46 PM
  3. Recommend linux distro and front end.
    By jdraughn in forum Software & Software Development
    Replies: 0
    Last Post: 02-22-2009, 08:56 PM
  4. PS2 Linux -- check it out
    By Superfly in forum General Hardware Discussion
    Replies: 7
    Last Post: 03-22-2003, 12:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •