Search Results

Search found 166 results on 7 pages for 'wm nchittest'.

Page 3/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Bash: infinite sleep

    - by watain
    I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate too because the .xinitrc script reached EOF. So I added this at the end of my .xinitrc: while true; do sleep 10000; done This way X won't terminate if I kill my WM. Now my question: how can I do an infinite sleep instead of looping sleep? Is there a command which will kinda like freeze the script? Best regards

    Read the article

  • What Windows message is fired for mouse-up with modifier keys?

    - by Greg
    My WndProc isn't seeing mouse-up notifications when I click with a modifier key (shift or control) pressed. I see them without the modifier key, and I see mouse-down notifications with the modifier keys. I'm using the Windows Forms NativeWindow wrapper to get Windows messages from the WndProc() method. I've tried tracking the notifications I do get, and I the only clue I see is WM_CAPTURECHANGED. I've tried calling SetCapture when I receive the WM_LBUTTONDOWN message, but it doesn't help. Without modifier (skipping paint, timer and NCHITTEST messages): WM_LBUTTONDOWN WM_SETCURSOR WM_MOUSEMOVE WM_SETCURSOR WM_LBUTTONUP With modifier (skipping paint, timer and NCHITTEST messages): WM_KEYDOWN WM_PARENTNOTIFY WM_MOUSEACTIVATE WM_MOUSEACTIVATE WM_SETCURSOR WM_LBUTTONDOWN WM_SETCURSOR (repeats) WM_KEYDOWN (repeats) WM_KEYUP If I hold the mouse button down for a long time, I can usually get a WM_LBUTTONUP notification, but it should be possible to make it more responsive.. What am I missing? Thanks.

    Read the article

  • How do you globally set the default browser using KDE4?

    - by wishi
    Hi! I'm using awesome-wm on Kubuntu 10.10. I like some of the KDE tools... like choqok. Thing is, that within awesome wm it seems to be impossible to set a default browser, because KDE4 settings overwrite the generally desired settings: To illustrate the problem: % xdg-mime query default text/html chromium-browser.desktop And from ~/.kde/share/config/kdeglobals [General] BrowserApplication=firefox.desktop Which does in no way make sense to me. If I set Firefox as default xdg-mime should not have Chrome. In fact I want Firefox. So how do I globally once and for all, across all frameworks, define Firefox as default? Best, Marius p.s.: I should probably mention, that clicking in Choqok starts Konqueror...

    Read the article

  • Logging in over and over again. How to fix this?

    - by romeovs
    Ok, I messed up. I installed ubuntu 11.10, installed awesome wm and removed unity, to have something to fall back on, I also installed gnome-session-fallback. I was messing around and did the following, because the awesome wiki told me to: gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop False # Still disable the buggy Nautilus desktop thing gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager awesome # sets awesome as wm Now here's what's wrong: I can start up decently, and then I get into a login window (that of gnome-session-fallback). I enter my username, select the preferred window manager (awesome in my case) and enter my password. It accepts these, but then hold for a second and just opens the login window again, in effect preventing me from actually logging in. I also tried gconftool-2 --unset (from the tty) on these settings, but that didn't work either. What can I do to revert the gconftool-2 settings to something that should work? I tried apt-get purging gnome-session-fallback and lightdm, and then installing them again, but that didn't work.

    Read the article

  • Can I use Unity with XMonad?

    - by geniass
    I've been using Fedora for a while, but I recently decided to upgrade my ubuntu installation from 12.04 to 12.10. While I was using Fedora, I found xmonad tiling window manager which I sort of got working with xfce. I really like xmonad and I now automatically use the keyboard shortcuts without even thinking. So I would like to use xmonad with unity. Now, I have seen several blog posts etc. that explain how to setup the whole thing in 12.04, with Unity2D. But now, Unity2D has been removed, and the old methods no longer apply. I have read that Unity is actually just a Compiz plugin, and that the wm can't be replaced. Does no version of Unity have a replaceable WM? I've also tried MATE (GNOME2 fork) with xmonad on 12.10 and that is totally broken for me, but that's for another question.

    Read the article

  • Is Google Analytics for Mobile available for Windows Mobile / Compact Framework

    - by Michal Drozdowicz
    Recently Google introduced an SDK for application usage tracking on mobile devices (Google Analytics for Mobile Apps). Unfortunately, it seems that it only supports IPhone and Android devices. Do you have any idea if this framework can somehow be used from Windows Mobile / Compact Framework applications or if Google is planning to release an SDK for WM? BTW, I don't mean a WM application for browsing through GA server reports, but an SDK for tracking your mobile app's usage.

    Read the article

  • get url of all tabs in a firefox window (if posssible all ff windows)

    - by encryptor
    I can retrieve the url of current tab in firefox using var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var mainWindow = wm.getMostRecentWindow("navigator:browser"); var tabbrowser = mainWindow.gBrowser; var url = tabbrowser.currentURI.spec; Now i want to do it for all tabs and save it in a string and if possible get it for tabs in the other ff windows as well. How can i do that?

    Read the article

  • Write a program that allows the user to enter a string and then prints the letters of the String sep

    - by WM
    The output is always a String, for example H,E,L,L,O,. How could I limit the commas? I want the commas only between letters, for example H,E,L,L,O. import java.util.Scanner; import java.lang.String; public class forLoop { public static void main(String[] args) { Scanner Scan = new Scanner(System.in); System.out.print("Enter a string: "); String Str1 = Scan.next(); String newString=""; String Str2 =""; for (int i=0; i < Str1.length(); i++) { newString = Str1.charAt(i) + ","; Str2 = Str2 + newString; } System.out.print(Str2); } }

    Read the article

  • How could I evaluate this in code?

    - by WM
    There is a medieval puzzle about an old woman and a basket of eggs. On her way to market, a horseman knocks down the old woman and all the eggs are broken. The horseman will pay for the eggs, but the woman does not remember the exact number she had, only that when she took the eggs in pair, there was one left over; similarly, there was one left over when she took them three or five at a time. When she took them seven at a time, however, none were left. Write an application that can determine the smallest number of eggs the woman could have had. It might be a multiple of seven because there are no eggs left when it's seven at a time. But I have a problem. 49 eggs -1=2*24 49 eggs -1=3*16 49 eggs-4=5*9 49 eggs-0=7*7

    Read the article

  • Why is my code not printing anything to stdout?

    - by WM
    I'm trying to calculate the average of a student's marks: import java.util.Scanner; public class Average { public static void main(String[] args) { int mark; int countTotal = 0; // to count the number of entered marks int avg = 0; // to calculate the total average Scanner Scan = new Scanner(System.in); System.out.print("Enter your average: "); String Name = Scan.next(); while (Scan.hasNextInt()) { mark = Scan.nextInt(); countTotal++; avg = avg + ((mark - avg) / countTotal); } System.out.print( Name + " " + avg ); } }

    Read the article

  • How to reverse a string?

    - by WM
    Example : hi how are you; output : you are how hi; but wrote this code and im stuck not knowing how to put a string into an array and reverse it..? public class Reverse { public static void main(String[] args) { Scanner text = new Scanner(System.in); System.out.print("Enter your Text : "); String input = text.nextLine(); Scanner text2 = new Scanner(text.nextLine()); String[] array = new String[] ; int i; for(i = 0; i < input.length(); i++) { array[i] = input;

    Read the article

  • from loop to Nested loops ?

    - by WM
    I have this program that returns a factorial of N. For example, when entering 4,,, it will give 1! , 2! , 3! How could I convert this to use nested loops? public class OneForLoop { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a number : "); int N = input.nextInt(); int factorial = 1; for(int i = 1; i < N; i++) { factorial *= i; System.out.println(i + "! = " + factorial); } } }

    Read the article

  • im writing this code so the user would enter his/her name and followed by his/her marks to get the a

    - by WM
    What if the user wanted to enter his/her grades in the following way: Will 23, 34, 45, 45 how would i get rid of the commas public class StudentAverage { public static void main(String[] args) { int markSum = 0; double average = 0; Scanner input1 = new Scanner(System.in); System.out.print("Enter student record : "); String name = input1.next(); Scanner input2 = new Scanner(input1.nextLine()); int countTotal = 0; while (input2.hasNextInt()) { countTotal++; markSum += input2.nextInt(); } average = markSum / countTotal; // to calculate the total average System.out.print( name + " " + average ); } }

    Read the article

  • How could i evaluate this to a code.?

    - by WM
    There is a medieval puzzle about an old woman and a basket of eggs. On her way to market, a horseman knocks down the old woman and all the eggs are broken. The horseman will pay for the eggs, but the woman does not remember the exact number she had, only that when she took the eggs in pair, there was one left over; similarly, there was one left over when she took them three or five at a time. When she took them seven at a time, however, none were left. Write an application that can determine the smallest number of eggs the woman could have had.

    Read the article

  • Lua Alien Module - Trouble using WriteProcessMemory function, unsure on types (unit32)

    - by jefferysanders
    require "alien" --the address im trying to edit in the Mahjong game on Win7 local SCOREREF = 0x0744D554 --this should give me full access to the process local ACCESS = 0x001F0FFF --this is my process ID for my open window of Mahjong local PID = 1136 --function to open proc local op = alien.Kernel32.OpenProcess op:types{ ret = "pointer", abi = "stdcall"; "int", "int", "int"} --function to write to proc mem local wm = alien.Kernel32.WriteProcessMemory wm:types{ ret = "long", abi = "stdcall"; "pointer", "pointer", "pointer", "long", "pointer" } local pRef = op(ACCESS, true, PID) local buf = alien.buffer("99") -- ptr,uint32,byte arr (no idea what to make this),int, ptr print( wm( pRef, SCOREREF, buf, 4, nil)) --prints 1 if success, 0 if failed So that is my code. I am not even sure if I have the types set correctly. I am completely lost and need some guidance. I really wish there was more online help/documentation for alien, it confuses my poor brain. What utterly baffles me is that it WriteProcessMemory will sometimes complete successfully (though it does nothing at all, to my knowledge) and will also sometimes fail to complete successfully. As I've stated, my brain hurts. Any help appreciated.

    Read the article

  • How to poll a file in /sys

    - by Bjoern
    Hi, I am stuck reading a file in /sys/ which contains the light intensity in Lux of the ambient light sensor on my Nokia N900 phone. See thread on talk.maemo.org here I tried to use pyinotify to poll the file but this looks some kind of wrong to me since the file is alway "process_IN_OPEN", "process_IN_ACCESS" and "process_IN_CLOSE_NOWRITE" I basically want to get the changes ASAP and if something changed trigger an event, execute a class... Here's the code I tried, which works, but not as I expected (I was hoping for process_IN_MODIFY to be triggered): #!/usr/bin/env python # -*- coding: utf-8 -*- # import os, time, pyinotify import pyinotify ambient_sensor = '/sys/class/i2c-adapter/i2c-2/2-0029/lux' wm = pyinotify.WatchManager() # Watch Manager mask = pyinotify.ALL_EVENTS def action(self, the_event): value = open(the_event.pathname, 'r').read().strip() return value class EventHandler(pyinotify.ProcessEvent): def process_IN_ACCESS(self, event): print "ACCESS event:", action(self, event) def process_IN_ATTRIB(self, event): print "ATTRIB event:", action(self, event) def process_IN_CLOSE_NOWRITE(self, event): print "CLOSE_NOWRITE event:", action(self, event) def process_IN_CLOSE_WRITE(self, event): print "CLOSE_WRITE event:", action(self, event) def process_IN_CREATE(self, event): print "CREATE event:", action(self, event) def process_IN_DELETE(self, event): print "DELETE event:", action(self, event) def process_IN_MODIFY(self, event): print "MODIFY event:", action(self, event) def process_IN_OPEN(self, event): print "OPEN event:", action(self, event) #log.setLevel(10) notifier = pyinotify.ThreadedNotifier(wm, EventHandler()) notifier.start() wdd = wm.add_watch(ambient_sensor, mask) wdd time.sleep(5) notifier.stop() Thanks for any hints, suggestions and examples Kind regards Bjoern

    Read the article

  • How can I receive mouse events when a wrapped control has set capture?

    - by Greg
    My WndProc isn't seeing mouse-up notifications when I click with a modifier key (shift or control) pressed. I see them without the modifier key, and I see mouse-down notifications with the modifier keys. I'm trying to track user actions in a component I didn't write, so I'm using the Windows Forms NativeWindow wrapper (wrapping the component) to get Windows messages from the WndProc() method. I've tried tracking the notifications I do get, and I the only clue I see is WM_CAPTURECHANGED. I've tried calling SetCapture when I receive the WM_LBUTTONDOWN message, but it doesn't help. Without modifier (skipping paint, timer and NCHITTEST messages): WM_PARENTNOTIFY WM_MOUSEACTIVATE WM_MOUSEACTIVATE WM_SETCURSOR WM_LBUTTONDOWN WM_SETCURSOR WM_MOUSEMOVE WM_SETCURSOR WM_LBUTTONUP With modifier (skipping paint, timer and NCHITTEST messages): WM_KEYDOWN WM_PARENTNOTIFY WM_MOUSEACTIVATE WM_MOUSEACTIVATE WM_SETCURSOR WM_LBUTTONDOWN WM_SETCURSOR (repeats) WM_KEYDOWN (repeats) WM_KEYUP If I hold the mouse button down for a long time, I can usually get a WM_LBUTTONUP notification, but it should be possible to make it more responsive.. Edit: I've tried control-clicking outside of the component of interest and moving the cursor into it before releasing the mouse button, and then I do get a WM_LBUTTONUP notification, so it looks like the component is capturing the mouse on mouse-down. Is there any way to receive that notification when another window has captured the mouse? Thanks.

    Read the article

  • Python: two loops at once

    - by Stephan Meijer
    I've got a problem: I am new to Python and I want to do multiple loops. I want to run a WebSocket client (Autobahn) and I want to run a loop which shows the filed which are edited in a specific folder (pyinotify or else Watchdog). Both are running forever, Great. Is there a way to run them at once and send a message via the WebSocket connection while I'm running the FileSystemWatcher, like with callbacks, multithreading, multiprocessing or just separate files? factory = WebSocketClientFactory("ws://localhost:8888/ws", debug=False) factory.protocol = self.webSocket connectWS(factory) reactor.run() If we run this, it will have success. But if we run this: factory = WebSocketClientFactory("ws://localhost:8888/ws", debug=False) factory.protocol = self.webSocket connectWS(factory) reactor.run() # Websocket client running now,running the filewatcher wm = pyinotify.WatchManager() mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE # watched events class EventHandler(pyinotify.ProcessEvent): def process_IN_CREATE(self, event): print "Creating:", event.pathname def process_IN_DELETE(self, event): print "Removing:", event.pathname handler = EventHandler() notifier = pyinotify.Notifier(wm, handler) wdd = wm.add_watch('/tmp', mask, rec=True) notifier.loop() This will create 2 loops, but since we already have a loop, the code after 'reactor.run()' will not run at all.. For your information: this project is going to be a sync client. Thanks a lot!

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >